summaryrefslogtreecommitdiff
path: root/keyboards/ergodox/keymaps/coderkun_neo2
diff options
context:
space:
mode:
authorcoderkun <olli@coderkun.de>2016-10-03 16:36:21 +0200
committercoderkun <olli@coderkun.de>2016-10-03 16:36:21 +0200
commit8dd69a1b05770be3131f6e5917e2552ec6579519 (patch)
tree4f6bb6afab14807e948de7aa5be20397080cb819 /keyboards/ergodox/keymaps/coderkun_neo2
parent4c9071964bba4d8b1f892b0be086d66863fee110 (diff)
Overwrite method hex_to_unicode() for make it compatible with Neo
Diffstat (limited to 'keyboards/ergodox/keymaps/coderkun_neo2')
-rw-r--r--keyboards/ergodox/keymaps/coderkun_neo2/keymap.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
index 238971e81e..b62b14449f 100644
--- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
+++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
@@ -290,3 +290,28 @@ void unicode_input_start (void) {
unregister_code(KC_LSFT);
unregister_code(KC_LCTL);
};
+
+// Override method to use NEO_A instead of KC_A
+uint16_t hex_to_keycode(uint8_t hex)
+{
+ if (hex == 0x0) {
+ return KC_0;
+ } else if (hex < 0xA) {
+ return KC_1 + (hex - 0x1);
+ } else {
+ switch(hex) {
+ case 0xA:
+ return NEO_A;
+ case 0xB:
+ return NEO_B;
+ case 0xC:
+ return NEO_C;
+ case 0xD:
+ return NEO_D;
+ case 0xE:
+ return NEO_E;
+ case 0xF:
+ return NEO_F;
+ }
+ }
+}