]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add method to set Unicode input key for ISO 14755
authorcoderkun <olli@coderkun.de>
Sun, 21 Aug 2016 18:25:19 +0000 (20:25 +0200)
committercoderkun <olli@coderkun.de>
Sun, 21 Aug 2016 18:27:23 +0000 (20:27 +0200)
https://github.com/jackhumbert/qmk_firmware/issues/672

quantum/process_keycode/process_unicode.c
quantum/process_keycode/process_unicode.h

index 72c809c30e4f12b4cc599bc41bdabe5d54709e7e..422217b6d14495fb0c78a14d6f7af67eb8f2bf42 100644 (file)
@@ -1,6 +1,7 @@
 #include "process_unicode.h"
 
 static uint8_t input_mode;
+static uint16_t linux_key = UNICODE_LNX_KEY;
 
 uint16_t hex_to_keycode(uint8_t hex)
 {
@@ -18,6 +19,11 @@ void set_unicode_input_mode(uint8_t os_target)
   input_mode = os_target;
 }
 
+void set_unicode_input_key_lnx(uint16_t key)
+{
+  linux_key = key;
+}
+
 void unicode_input_start (void) {
   switch(input_mode) {
   case UC_OSX:
@@ -26,8 +32,8 @@ void unicode_input_start (void) {
   case UC_LNX:
     register_code(KC_LCTL);
     register_code(KC_LSFT);
-    register_code(KC_U);
-    unregister_code(KC_U);
+    register_code(linux_key);
+    unregister_code(linux_key);
     unregister_code(KC_LSFT);
     unregister_code(KC_LCTL);
     break;
index 85364e8eb3bd721a5a017a02ed1a9cb0396b24f3..60a116ab74771954d46f28288baa3eee8e6f120f 100644 (file)
@@ -8,11 +8,16 @@
 #define UC_WIN 2
 #define UC_BSD 3
 
+#ifndef UNICODE_LNX_KEY
+#define UNICODE_LNX_KEY KC_A
+#endif
+
 #ifndef UNICODE_TYPE_DELAY
 #define UNICODE_TYPE_DELAY 10
 #endif
 
 void set_unicode_input_mode(uint8_t os_target);
+void set_unicode_input_key_lnx(uint16_t linux_key);
 void unicode_input_start(void);
 void unicode_input_finish(void);
 void register_hex(uint16_t hex);