I want to remap the four keys ()-=
to Caps+jkl;
respectively.
The idea is to not leave the home row for typing these characters which are very common in programming.
This includes pressing Caps Shift l
to produce _
, which is the equivalent of Shift -
I also want Caps
to act as ESC
when pressed on it's own.
What I've tried already:
- https://github.com/simos/keyboardlayouteditor - Installation has syntax error
- https://www.bedroomlan.org/projects/evrouter/ - No support for multi keys
- editing
/usr/share/X11/xkb/symbols/pc
- I don't see an option for combinations, and couldnn't figure it out from the docs - evdevremapkeys - no support as described in this issue
xdotool
- works but it's very slow ...- Mapping directly in
vim
- that would be my fallback, tho I want this available system-wide
Any help appreciated, probably some guidance would be enough for me to crack this one.
Thanks!
Work Around
Warning: editing the file
/usr/share/X11/xkb/symbols/us
is very risky if any small typo mistakes occur.. it leads to login loop.. Proceed only if you can manage things from tty in such case../usr/share/X11/xkb/symbols/
run command:
us
filerun command:
us
run command:
Content:
Save the file and Close.
gnome-shell refresh with Alt+F2rEnter or Logout & Login may be required..not tested..
make Caps_Lock as the level3 modifier with the below command
run command:
with the above command the
Caps_Lock
modifier changed toISO_Level3_Shift
which will print the 3rd keysym from the editedus
file while Caps_Lock is held down.. similarly 4th keysym if Caps_Lock & Shift are held down..xcape
..run command:
run command:
thats it.. You are Done..
with the Caps_Lock Modifier all the 4 things
(
)
-
=
and with Caps_Lock+Shift Modifiers_
are achieved..When only Caps_Lock is pressed and released.. It acted as Escape as that is how we configured.