diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2017-03-31 18:27:44 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-31 18:27:44 -0400 |
| commit | 2b4efaba53164fc1487df3147ac7ded8bece4272 (patch) | |
| tree | 48e8fe12880f58ebc7e143d245af5826c20b6f54 /quantum/process_keycode/process_unicode.c | |
| parent | b441468795ed5ca67359d02eb2588844873da3e3 (diff) | |
| parent | d1e66e2e0715c680a8da3216525b54fd8f2b671f (diff) | |
| download | qmk_firmware-2b4efaba53164fc1487df3147ac7ded8bece4272.tar.gz qmk_firmware-2b4efaba53164fc1487df3147ac7ded8bece4272.zip | |
Merge pull request #1189 from Zay950/to_push
Unicode input_mode presistance
Diffstat (limited to 'quantum/process_keycode/process_unicode.c')
| -rw-r--r-- | quantum/process_keycode/process_unicode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 26571ea03..678a15234 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c | |||
| @@ -16,8 +16,14 @@ | |||
| 16 | #include "process_unicode.h" | 16 | #include "process_unicode.h" |
| 17 | #include "action_util.h" | 17 | #include "action_util.h" |
| 18 | 18 | ||
| 19 | static uint8_t first_flag = 0; | ||
| 20 | |||
| 19 | bool process_unicode(uint16_t keycode, keyrecord_t *record) { | 21 | bool process_unicode(uint16_t keycode, keyrecord_t *record) { |
| 20 | if (keycode > QK_UNICODE && record->event.pressed) { | 22 | if (keycode > QK_UNICODE && record->event.pressed) { |
| 23 | if (first_flag == 0) { | ||
| 24 | set_unicode_input_mode(eeprom_read_byte(EECONFIG_UNICODEMODE)); | ||
| 25 | first_flag = 1; | ||
| 26 | } | ||
| 21 | uint16_t unicode = keycode & 0x7FFF; | 27 | uint16_t unicode = keycode & 0x7FFF; |
| 22 | unicode_input_start(); | 28 | unicode_input_start(); |
| 23 | register_hex(unicode); | 29 | register_hex(unicode); |
