diff options
-rw-r--r-- | quantum/process_keycode/process_unicode.c | 10 | ||||
-rw-r--r-- | quantum/process_keycode/process_unicode.h | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 72c809c30..422217b6d 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "process_unicode.h" | 1 | #include "process_unicode.h" |
2 | 2 | ||
3 | static uint8_t input_mode; | 3 | static uint8_t input_mode; |
4 | static uint16_t linux_key = UNICODE_LNX_KEY; | ||
4 | 5 | ||
5 | uint16_t hex_to_keycode(uint8_t hex) | 6 | uint16_t hex_to_keycode(uint8_t hex) |
6 | { | 7 | { |
@@ -18,6 +19,11 @@ void set_unicode_input_mode(uint8_t os_target) | |||
18 | input_mode = os_target; | 19 | input_mode = os_target; |
19 | } | 20 | } |
20 | 21 | ||
22 | void set_unicode_input_key_lnx(uint16_t key) | ||
23 | { | ||
24 | linux_key = key; | ||
25 | } | ||
26 | |||
21 | void unicode_input_start (void) { | 27 | void unicode_input_start (void) { |
22 | switch(input_mode) { | 28 | switch(input_mode) { |
23 | case UC_OSX: | 29 | case UC_OSX: |
@@ -26,8 +32,8 @@ void unicode_input_start (void) { | |||
26 | case UC_LNX: | 32 | case UC_LNX: |
27 | register_code(KC_LCTL); | 33 | register_code(KC_LCTL); |
28 | register_code(KC_LSFT); | 34 | register_code(KC_LSFT); |
29 | register_code(KC_U); | 35 | register_code(linux_key); |
30 | unregister_code(KC_U); | 36 | unregister_code(linux_key); |
31 | unregister_code(KC_LSFT); | 37 | unregister_code(KC_LSFT); |
32 | unregister_code(KC_LCTL); | 38 | unregister_code(KC_LCTL); |
33 | break; | 39 | break; |
diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 85364e8eb..60a116ab7 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h | |||
@@ -8,11 +8,16 @@ | |||
8 | #define UC_WIN 2 | 8 | #define UC_WIN 2 |
9 | #define UC_BSD 3 | 9 | #define UC_BSD 3 |
10 | 10 | ||
11 | #ifndef UNICODE_LNX_KEY | ||
12 | #define UNICODE_LNX_KEY KC_A | ||
13 | #endif | ||
14 | |||
11 | #ifndef UNICODE_TYPE_DELAY | 15 | #ifndef UNICODE_TYPE_DELAY |
12 | #define UNICODE_TYPE_DELAY 10 | 16 | #define UNICODE_TYPE_DELAY 10 |
13 | #endif | 17 | #endif |
14 | 18 | ||
15 | void set_unicode_input_mode(uint8_t os_target); | 19 | void set_unicode_input_mode(uint8_t os_target); |
20 | void set_unicode_input_key_lnx(uint16_t linux_key); | ||
16 | void unicode_input_start(void); | 21 | void unicode_input_start(void); |
17 | void unicode_input_finish(void); | 22 | void unicode_input_finish(void); |
18 | void register_hex(uint16_t hex); | 23 | void register_hex(uint16_t hex); |