Skip to content

Instantly share code, notes, and snippets.

@errzey
Created July 4, 2010 05:38
Show Gist options
  • Save errzey/463180 to your computer and use it in GitHub Desktop.
Save errzey/463180 to your computer and use it in GitHub Desktop.
switch (input_event.code) {
case KEY_RIGHTSHIFT:
case KEY_LEFTSHIFT:
kb->shift_mod = input_event.value;
return;
case KEY_RIGHTCTRL:
case KEY_LEFTCTRL:
/* I don't really care about ctrl chars */
return;
case KEY_CAPSLOCK:
if (input_event.value == 1) {
if (kb->caps_mod) {
kb->caps_mod = 0;
} else {
kb->caps_mod = 1;
}
}
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment