Skip to content

Commit

Permalink
Fix issue qmk#9533 (Sending unicode via XP macro uses a delayed Shift…
Browse files Browse the repository at this point in the history
… state)
  • Loading branch information
spidey3 committed Dec 15, 2020
1 parent 3925ff5 commit 671b40a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion quantum/process_keycode/process_unicodemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ __attribute__((weak)) uint16_t unicodemap_index(uint16_t keycode) {
// Keycode is a pair: extract index based on Shift / Caps Lock state
uint16_t index = keycode - QK_UNICODEMAP_PAIR;

bool shift = unicode_saved_mods & MOD_MASK_SHIFT;
uint8_t mods = get_mods();
#ifndef NO_ACTION_ONESHOT
mods |= get_oneshot_mods();
#endif

bool shift = mods & MOD_MASK_SHIFT;
bool caps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK);
if (shift ^ caps) {
index >>= 7;
Expand Down

0 comments on commit 671b40a

Please sign in to comment.