summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@no.no.james.local>2015-06-09 18:23:40 +0100
committerroot <root@no.no.james.local>2015-06-09 18:23:40 +0100
commit162fcd3f8d879615dc39181daea95ef6fcb83752 (patch)
tree1a8559e2d0ff28a955787365da3049de27f62969
parent1610fa2db794cb02617d0bf56f9a2fa5121592fe (diff)
downloadtims_keyboard-162fcd3f8d879615dc39181daea95ef6fcb83752.tar.gz
tims_keyboard-162fcd3f8d879615dc39181daea95ef6fcb83752.tar.bz2
tims_keyboard-162fcd3f8d879615dc39181daea95ef6fcb83752.zip
stop sending control keys as keys
-rw-r--r--app/keyboard.c32
1 files 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;
+ }
}
}
}