Skip to content

Commit

Permalink
Custom shift keys: handle weak mods
Browse files Browse the repository at this point in the history
  • Loading branch information
getreuer committed Jan 20, 2022
1 parent 7c9f198 commit b102238
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions features/custom_shift_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ bool process_custom_shift_keys(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
const uint8_t mods = get_mods();
#ifndef NO_ACTION_ONESHOT
if ((mods | get_oneshot_mods()) & MOD_MASK_SHIFT) {
if ((mods | get_weak_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) {
del_oneshot_mods(MOD_MASK_SHIFT);
#else
if (mods & MOD_MASK_SHIFT) {
if ((mods | get_weak_mods()) & MOD_MASK_SHIFT) {
#endif // NO_ACTION_ONESHOT
del_mods(MOD_MASK_SHIFT);
del_weak_mods(MOD_MASK_SHIFT);
registered_keycode = custom_shift_keys[i].shifted_keycode;
} else {
registered_keycode = custom_shift_keys[i].keycode;
Expand Down

0 comments on commit b102238

Please sign in to comment.