diff options
author | tmk <nobody@nowhere> | 2012-04-29 03:09:40 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2012-04-29 03:09:40 +0900 |
commit | d553289e7edfdf17dfe4fb9cf45a3b23ea2e03df (patch) | |
tree | d2f9d499f928b61fed47d29cec0d20ffbf523397 /m0110.c | |
parent | 9dec116bc0f105fa24645e0ab936be2bff208e5d (diff) |
Ignore release flag when comparing key event.
Diffstat (limited to 'm0110.c')
-rw-r--r-- | m0110.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -304,17 +304,16 @@ uint8_t m0110_recv_key(void) return key; } key = instant(); // Use INSTANT for better response. Should be INQUIRY ? - switch (key) { + switch (key & 0x7F) { case M0110_KEYPAD: // Pad/Arrow keys return (M0110_RAW2SCAN(instant()) | M0110_KEYPAD_OFFSET); break; - case M0110_SHIFT_MAKE: - case M0110_SHIFT_BREAK: + case M0110_SHIFT: key2 = instant(); if (key2 == M0110_KEYPAD) { key3 = instant(); - switch (key3) { + switch (key3 & 0x7F) { case M0110_ARROW_UP: case M0110_ARROW_DOWN: case M0110_ARROW_LEFT: |