summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoderkun <olli@coderkun.de>2016-12-28 20:08:45 +0100
committercoderkun <olli@coderkun.de>2016-12-28 20:08:45 +0100
commitb0ade6dc9838d4112cbc3093ac3033aa81ef172d (patch)
treeb1d50a0ebfb15675da23f15bf7bba2c939efddaf
parent223cffd92f44311612aacbfb3358ec7a33a68d74 (diff)
downloadqmk_firmware-b0ade6dc9838d4112cbc3093ac3033aa81ef172d.tar.gz
qmk_firmware-b0ade6dc9838d4112cbc3093ac3033aa81ef172d.zip
Fix return value of hex_to_keycode() function in keymap “coderkun_neo2”
-rw-r--r--keyboards/ergodox/keymaps/coderkun_neo2/keymap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
index b62b14449f..9b33bbd6d0 100644
--- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
+++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
@@ -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);
}