commit 9f353f96c658c7a8f593fa4075dab5c4fa1a8887
parent 27efcbbf962b340724674c8fb0403514a9afedf1
Author: Francisco Lopes <francisco@oblita.com>
Date: Thu, 30 Nov 2017 01:57:47 -0200
Another evdev protocol infringement
Even though Peter Hutterer commented that it's not technically needed to
send SYN/delay when the sequence of events is of different keys, it
seems to be shown necessary to do so, otherwise events are dropped in
random situations.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/caps2esc.c b/caps2esc.c
@@ -66,6 +66,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;