I use xmodmap now to swap keys, for example:
#! /bin/sh
#swap escape with tilde on the model m spacesaver
#Using the original tilde key as escape
xmodmap -e "keycode 49 = Escape"
#Using the original escape key as tilde and tick
xmodmap -e "keycode 9 = asciitilde grave"
I haven't figured out how to map multiple keys yet, for example:
The windows k is mapped as Meta_L
xev returns this:
KeyRelease event, serial 35, synthetic NO, window 0x5a00001,
root 0x1a7, subw 0x0, time 157126402, (102,774), root:(1646,828),
state 0x40, keycode 133 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
The k key returns this:
KeyPress event, serial 35, synthetic NO, window 0x5a00001,
root 0x1a7, subw 0x0, time 157178744, (-282,751), root:(1262,805),
state 0x0, keycode 45 (keysym 0x6b, k), same_screen YES,
XLookupString gives 1 bytes: (6b) "k"
XmbLookupString gives 1 bytes: (6b) "k"
XFilterEvent returns: False
The home key returns:
KeyPress event, serial 35, synthetic NO, window 0x5a00001,
root 0x1a7, subw 0x0, time 157241473, (-184,650), root:(1360,704),
state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
I want Meta_L + k to equal Home
I just haven't figured how to write it yet.