I'm trying to get Caps Lock to generate Left and Shift+Caps Lock to generate Right. I would like other modifiers (not Shift) to be passed through unchanged.
I have a new laptop with tiny arrow keys that are hard to hit. That makes going back in the browser hard to do with the keyboard. With the remapping I'm trying to achieve, Alt+Caps Lock translates to Alt+Left, which is great. I want to be able to go forward through Alt+Shift+Caps Lock.
Here's what I've tried with setxkbmap
:
default partial xkb_symbols "basic" {
include "us(basic)"
include "shift(both_capslock_cancel)"
key <CAPS> { [ Left, Right ] };
};
This works for Left, but fails for Right. Emacs C-h c
reports that I'm sending Shift+Right when I type Caps Lock+Right. Emacs handles that fine, but Chrome appears to be confused by the Shift modifier.
How can I remove the Shift modifier in this case? I've tried all kinds of variations on the above, but without success.
Thanks.