]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Fix return value of hex_to_keycode() function in keymap “coderkun_neo2”
authorcoderkun <olli@coderkun.de>
Wed, 28 Dec 2016 19:08:45 +0000 (20:08 +0100)
committercoderkun <olli@coderkun.de>
Wed, 28 Dec 2016 19:08:45 +0000 (20:08 +0100)
keyboards/ergodox/keymaps/coderkun_neo2/keymap.c

index b62b14449fc25f7a44564dccb3d55ee18c357674..9b33bbd6d0134dc03d89ca41a2cc01bc6fb8aaf7 100644 (file)
@@ -294,11 +294,10 @@ void unicode_input_start (void) {
 // Override method to use NEO_A instead of KC_A
 uint16_t hex_to_keycode(uint8_t hex)
 {
-  if (hex == 0x0) {
+  if(hex == 0x0) {
     return KC_0;
-  } else if (hex < 0xA) {
-    return KC_1 + (hex - 0x1);
-  } else {
+  }
+  else if(hex >= 0xA) {
     switch(hex) {
       case 0xA:
         return NEO_A;
@@ -314,4 +313,6 @@ uint16_t hex_to_keycode(uint8_t hex)
         return NEO_F;
     }
   }
+
+  return KC_1 + (hex - 0x1);
 }