mirror of
https://gitlab.com/interception/linux/plugins/caps2esc.git
synced 2025-07-07 11:28:50 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
bb09cd8d9a | |||
0d88388a9e | |||
9f353f96c6 |
@ -56,6 +56,12 @@ I'm maintaining an Archlinux package on AUR:
|
||||
|
||||
- <https://aur.archlinux.org/packages/interception-caps2esc>
|
||||
|
||||
I don't use Ubuntu and recommend Archlinux instead, as it provides the AUR, so I
|
||||
don't maintain PPAs. For more information on Ubuntu/Debian installation check
|
||||
this:
|
||||
|
||||
- <https://askubuntu.com/questions/979359/how-do-i-install-caps2esc>
|
||||
|
||||
## Caveats
|
||||
|
||||
As always, there's always a caveat:
|
||||
|
@ -39,6 +39,9 @@ int main(void) {
|
||||
setbuf(stdin, NULL), setbuf(stdout, NULL);
|
||||
|
||||
while (read_event(&input)) {
|
||||
if (input.type == EV_MSC && input.code == MSC_SCAN)
|
||||
continue;
|
||||
|
||||
if (input.type != EV_KEY) {
|
||||
write_event(&input);
|
||||
continue;
|
||||
@ -66,6 +69,8 @@ int main(void) {
|
||||
if (!esc_give_up && input.value) {
|
||||
esc_give_up = 1;
|
||||
write_event(&ctrl_down);
|
||||
write_event(&syn);
|
||||
usleep(20000);
|
||||
}
|
||||
} else if (equal(&input, &capslock_down)) {
|
||||
capslock_is_down = 1;
|
||||
|
Reference in New Issue
Block a user