diff options
author | coderkun <olli@coderkun.de> | 2016-08-21 21:02:18 +0200 |
---|---|---|
committer | coderkun <olli@coderkun.de> | 2016-08-21 21:02:18 +0200 |
commit | 81594c7883deefedbcd317c72c1b1f1d32e65cd7 (patch) | |
tree | 007bfaeff0419e82c1dc0d5df25feeabd5342d3f /quantum/process_keycode/process_unicode.c | |
parent | dffdeb50b79d3c623e2ed9fd1c1d82d6d0ae7bf0 (diff) | |
download | qmk_firmware-81594c7883deefedbcd317c72c1b1f1d32e65cd7.tar.gz qmk_firmware-81594c7883deefedbcd317c72c1b1f1d32e65cd7.zip |
Drop method to set Unicode input key and declare start and finish methods as “weak” instead
Diffstat (limited to 'quantum/process_keycode/process_unicode.c')
-rw-r--r-- | quantum/process_keycode/process_unicode.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 422217b6d..a1be8d2fc 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c | |||
@@ -1,7 +1,6 @@ | |||
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; | ||
5 | 4 | ||
6 | uint16_t hex_to_keycode(uint8_t hex) | 5 | uint16_t hex_to_keycode(uint8_t hex) |
7 | { | 6 | { |
@@ -19,11 +18,7 @@ void set_unicode_input_mode(uint8_t os_target) | |||
19 | input_mode = os_target; | 18 | input_mode = os_target; |
20 | } | 19 | } |
21 | 20 | ||
22 | void set_unicode_input_key_lnx(uint16_t key) | 21 | __attribute__((weak)) |
23 | { | ||
24 | linux_key = key; | ||
25 | } | ||
26 | |||
27 | void unicode_input_start (void) { | 22 | void unicode_input_start (void) { |
28 | switch(input_mode) { | 23 | switch(input_mode) { |
29 | case UC_OSX: | 24 | case UC_OSX: |
@@ -32,8 +27,8 @@ void unicode_input_start (void) { | |||
32 | case UC_LNX: | 27 | case UC_LNX: |
33 | register_code(KC_LCTL); | 28 | register_code(KC_LCTL); |
34 | register_code(KC_LSFT); | 29 | register_code(KC_LSFT); |
35 | register_code(linux_key); | 30 | register_code(KC_U); |
36 | unregister_code(linux_key); | 31 | unregister_code(KC_U); |
37 | unregister_code(KC_LSFT); | 32 | unregister_code(KC_LSFT); |
38 | unregister_code(KC_LCTL); | 33 | unregister_code(KC_LCTL); |
39 | break; | 34 | break; |
@@ -46,6 +41,7 @@ void unicode_input_start (void) { | |||
46 | wait_ms(UNICODE_TYPE_DELAY); | 41 | wait_ms(UNICODE_TYPE_DELAY); |
47 | } | 42 | } |
48 | 43 | ||
44 | __attribute__((weak)) | ||
49 | void unicode_input_finish (void) { | 45 | void unicode_input_finish (void) { |
50 | switch(input_mode) { | 46 | switch(input_mode) { |
51 | case UC_OSX: | 47 | case UC_OSX: |