]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Ignore release flag when comparing key event.
authortmk <nobody@nowhere>
Sat, 28 Apr 2012 18:09:40 +0000 (03:09 +0900)
committertmk <nobody@nowhere>
Sat, 28 Apr 2012 18:09:40 +0000 (03:09 +0900)
m0110.c
m0110.h

diff --git a/m0110.c b/m0110.c
index 68ce2d1c5aa14d83cbcc05f0e8972c5d5423b3b0..20b4860aa0066172d4a33023e46b59c8933373e4 100644 (file)
--- a/m0110.c
+++ b/m0110.c
@@ -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:
diff --git a/m0110.h b/m0110.h
index 39da4ad662a079563642f2bbcc16fd16658679b2..7d2ffa83a04db5c177f8343ba486a0390fa27188 100644 (file)
--- a/m0110.h
+++ b/m0110.h
@@ -65,8 +65,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #define M0110_KEYPAD        0x79
 #define M0110_TEST_ACK      0x7D
 #define M0110_TEST_NAK      0x77
-#define M0110_SHIFT_MAKE    0x71
-#define M0110_SHIFT_BREAK   0xF1
+#define M0110_SHIFT         0x71
 #define M0110_ARROW_UP      0x1B
 #define M0110_ARROW_DOWN    0x11
 #define M0110_ARROW_LEFT    0x0D