1
0
Fork 0

Unicode, Unicodemap and UCIS refactor (#21659)

This commit is contained in:
Ryan 2023-08-27 13:30:19 +10:00 committed by GitHub
parent 95681b8ff4
commit 70e34e491c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 1196 additions and 386 deletions

View file

@ -17,7 +17,8 @@
#include "process_unicode_common.h"
#include "unicode.h"
#include "action_util.h"
#include "keycode.h"
#include "keycodes.h"
#include "modifiers.h"
#if defined(UNICODE_ENABLE)
# include "process_unicode.h"
@ -32,10 +33,18 @@ bool process_unicode_common(uint16_t keycode, keyrecord_t *record) {
bool shifted = get_mods() & MOD_MASK_SHIFT;
switch (keycode) {
case QK_UNICODE_MODE_NEXT:
cycle_unicode_input_mode(shifted ? -1 : +1);
if (shifted) {
unicode_input_mode_step_reverse();
} else {
unicode_input_mode_step();
}
break;
case QK_UNICODE_MODE_PREVIOUS:
cycle_unicode_input_mode(shifted ? +1 : -1);
if (shifted) {
unicode_input_mode_step();
} else {
unicode_input_mode_step_reverse();
}
break;
case QK_UNICODE_MODE_MACOS:
set_unicode_input_mode(UNICODE_MODE_MACOS);