From 162fcd3f8d879615dc39181daea95ef6fcb83752 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 9 Jun 2015 18:23:40 +0100 Subject: stop sending control keys as keys --- app/keyboard.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/keyboard.c b/app/keyboard.c index d06f555..d35f466 100644 --- a/app/keyboard.c +++ b/app/keyboard.c @@ -154,31 +154,31 @@ keyboard_dispatch (int sc, int updown) modifiers |= 1 << (sc - USB_K_SC_LEFTCTRL); else modifiers &= ~(1 << (sc - USB_K_SC_LEFTCTRL)); - } - - + break; + default: /* Some oses are picky and need these not to move about so we make * a list of the down keys */ - if (updown) - { - for (i = 0; i < KEY_LIST_LEN; ++i) + if (updown) { - if ((key_list[i] == 0) || (key_list[i] == sc)) + for (i = 0; i < KEY_LIST_LEN; ++i) { - key_list[i] = sc; - break; + if ((key_list[i] == 0) || (key_list[i] == sc)) + { + key_list[i] = sc; + break; + } } } - } - else - { - for (i = 0; i < KEY_LIST_LEN; ++i) + else { - if (key_list[i] == sc) + for (i = 0; i < KEY_LIST_LEN; ++i) { - key_list[i] = 0; - break; + if (key_list[i] == sc) + { + key_list[i] = 0; + break; + } } } } -- cgit v1.2.3