mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-14 12:34:39 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
96a5e560d7
2 changed files with 7 additions and 3 deletions
|
@ -75,7 +75,6 @@ typedef union {
|
||||||
} unicode_config_t;
|
} unicode_config_t;
|
||||||
|
|
||||||
extern unicode_config_t unicode_config;
|
extern unicode_config_t unicode_config;
|
||||||
extern uint8_t unicode_saved_mods;
|
|
||||||
|
|
||||||
void unicode_input_mode_init(void);
|
void unicode_input_mode_init(void);
|
||||||
uint8_t get_unicode_input_mode(void);
|
uint8_t get_unicode_input_mode(void);
|
||||||
|
|
|
@ -21,8 +21,13 @@ __attribute__((weak)) uint16_t unicodemap_index(uint16_t keycode) {
|
||||||
// Keycode is a pair: extract index based on Shift / Caps Lock state
|
// Keycode is a pair: extract index based on Shift / Caps Lock state
|
||||||
uint16_t index = keycode - QK_UNICODEMAP_PAIR;
|
uint16_t index = keycode - QK_UNICODEMAP_PAIR;
|
||||||
|
|
||||||
bool shift = unicode_saved_mods & MOD_MASK_SHIFT;
|
uint8_t mods = get_mods() | get_weak_mods();
|
||||||
bool caps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK);
|
#ifndef NO_ACTION_ONESHOT
|
||||||
|
mods |= get_oneshot_mods();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool shift = mods & MOD_MASK_SHIFT;
|
||||||
|
bool caps = host_keyboard_led_state().caps_lock;
|
||||||
if (shift ^ caps) {
|
if (shift ^ caps) {
|
||||||
index >>= 7;
|
index >>= 7;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue