629 |
} |
} |
630 |
} |
} |
631 |
|
|
632 |
if ((tr.modifiers & MapLeftShiftMask) |
/* Windows interprets CapsLock+Ctrl+key |
633 |
&& ((remote_modifier_state & MapLeftCtrlMask) |
differently from Shift+Ctrl+key. Since we |
634 |
|| (remote_modifier_state & MapRightCtrlMask)) |
are simulating CapsLock with Shifts, things |
635 |
&& get_key_state(state, XK_Caps_Lock)) |
like Ctrl+f with CapsLock on breaks. To |
636 |
|
solve this, we are releasing Shift if Ctrl |
637 |
|
is on, but only if Shift isn't physically pressed. */ |
638 |
|
if (MASK_HAS_BITS(tr.modifiers, MapShiftMask) |
639 |
|
&& MASK_HAS_BITS(remote_modifier_state, MapCtrlMask) |
640 |
|
&& !MASK_HAS_BITS(state, ShiftMask)) |
641 |
{ |
{ |
642 |
DEBUG_KBD(("CapsLock + Ctrl pressed, releasing LeftShift\n")); |
DEBUG_KBD(("Non-physical Shift + Ctrl pressed, releasing Shift\n")); |
643 |
tr.modifiers ^= MapLeftShiftMask; |
MASK_REMOVE_BITS(tr.modifiers, MapShiftMask); |
644 |
} |
} |
645 |
|
|
646 |
DEBUG_KBD(("Found scancode translation, scancode=0x%x, modifiers=0x%x\n", |
DEBUG_KBD(("Found scancode translation, scancode=0x%x, modifiers=0x%x\n", |