diff options
| author | Ryan <fauxpark@gmail.com> | 2023-08-27 13:30:19 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-27 13:30:19 +1000 |
| commit | 70e34e491c297231a3f987fd69760d38e79dbfa4 (patch) | |
| tree | a3fe26ea27c9d020142f4c248fa0bab5d32c1f9c /quantum/process_keycode/process_unicode_common.c | |
| parent | 95681b8ff4a92aacd0249e124d34cf16e510175e (diff) | |
Unicode, Unicodemap and UCIS refactor (#21659)
Diffstat (limited to 'quantum/process_keycode/process_unicode_common.c')
| -rw-r--r-- | quantum/process_keycode/process_unicode_common.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index a0b9010027..f43770977a 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c | |||
| @@ -17,7 +17,8 @@ | |||
| 17 | #include "process_unicode_common.h" | 17 | #include "process_unicode_common.h" |
| 18 | #include "unicode.h" | 18 | #include "unicode.h" |
| 19 | #include "action_util.h" | 19 | #include "action_util.h" |
| 20 | #include "keycode.h" | 20 | #include "keycodes.h" |
| 21 | #include "modifiers.h" | ||
| 21 | 22 | ||
| 22 | #if defined(UNICODE_ENABLE) | 23 | #if defined(UNICODE_ENABLE) |
| 23 | # include "process_unicode.h" | 24 | # include "process_unicode.h" |
| @@ -32,10 +33,18 @@ bool process_unicode_common(uint16_t keycode, keyrecord_t *record) { | |||
| 32 | bool shifted = get_mods() & MOD_MASK_SHIFT; | 33 | bool shifted = get_mods() & MOD_MASK_SHIFT; |
| 33 | switch (keycode) { | 34 | switch (keycode) { |
| 34 | case QK_UNICODE_MODE_NEXT: | 35 | case QK_UNICODE_MODE_NEXT: |
| 35 | cycle_unicode_input_mode(shifted ? -1 : +1); | 36 | if (shifted) { |
| 37 | unicode_input_mode_step_reverse(); | ||
| 38 | } else { | ||
| 39 | unicode_input_mode_step(); | ||
| 40 | } | ||
| 36 | break; | 41 | break; |
| 37 | case QK_UNICODE_MODE_PREVIOUS: | 42 | case QK_UNICODE_MODE_PREVIOUS: |
| 38 | cycle_unicode_input_mode(shifted ? +1 : -1); | 43 | if (shifted) { |
| 44 | unicode_input_mode_step(); | ||
| 45 | } else { | ||
| 46 | unicode_input_mode_step_reverse(); | ||
| 47 | } | ||
| 39 | break; | 48 | break; |
| 40 | case QK_UNICODE_MODE_MACOS: | 49 | case QK_UNICODE_MODE_MACOS: |
| 41 | set_unicode_input_mode(UNICODE_MODE_MACOS); | 50 | set_unicode_input_mode(UNICODE_MODE_MACOS); |
