I want to use 'ijkl' together with alt to act like arrow keys.
i.e. Alt+i = Up , Alt+K = Down etc.
I have tried xmodmap following this answer. The answer says that Alt modified key is the third column in xmodmap. Yet,
xmodmap -e "keycode 31 = i I Up"
does not assign up to Alt+i.
I have also tried xbindkeys following another answer. But this does not work as well.
"xvkbd -xsendevent -text '\[Left]'"
m:0x18 + c:44
alt + j
"xvkbd -xsendevent -text '\[Down]'"
m:0x18 + c:45
alt + k
"xvkbd -xsendevent -text '\[Right]'"
m:0x18 + c:46
alt + l
"xvkbd -xsendevent -text '\[Up]'"
m:0x18 + c:31
alt + i
I would much appreciate a solution, preferably that does not break other alt combinations that I have like ctrl+alt+t to open terminal etc.
edit: (if it helps for the answer)
after I do xmodmap re-assignment when I run xev and press Alt+i it returns the following.
KeyPress event, serial 37, synthetic NO, window 0x2e00001,
root 0x66b, subw 0x0, time 35626163, (161,-15), root:(261,144),
state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 37, synthetic NO, window 0x2e00001,
mode NotifyGrab, detail NotifyAncestor
KeyPress event, serial 37, synthetic YES, window 0x2e00001,
root 0x66b, subw 0x0, time 0, (1,1), root:(1,1),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic YES, window 0x2e00001,
root 0x66b, subw 0x0, time 0, (1,1), root:(1,1),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic YES, window 0x2e00001,
root 0x66b, subw 0x0, time 0, (1,1), root:(1,1),
state 0x0, keycode 111 (keysym 0xff52, Up), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic YES, window 0x2e00001,
root 0x66b, subw 0x0, time 0, (1,1), root:(1,1),
state 0x0, keycode 111 (keysym 0xff52, Up), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
FocusIn event, serial 37, synthetic NO, window 0x2e00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 37, synthetic NO, window 0x0,
keys: 4294967216 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeyRelease event, serial 37, synthetic NO, window 0x2e00001,
root 0x66b, subw 0x0, time 35628444, (161,-15), root:(261,144),
state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
First, I do not know why Shift_L shows up. Second, it shows that Up keypress even is registered somehow, yet it does not have any effect, for example it does not move the cursor up.
(I use Ubuntu 20.04)