Hello !
I’m trying to remap the Alt+left key combination to Home (and Alt+right to End)
I’m using xkb using the following method :
xkbcomp $DISPLAY keymap.xkb
# change the file
xkbcomp keymap.xkb $DISPLAY
I’ve exported my keymap file and made the following changes to the left and right keys:
key <LEFT> {
type[Group1] = "PC_ALT_LEVEL2",
symbols[Group1]= [ Left, Home ]
};
key <RGHT> {
type[Group1]= "PC_ALT_LEVEL2",
symbols[Group1]= [ Right, End ]
};
These changes seem to work because when I use xev I get the following output when I press Alt+left :
KeyPress event, serial 28, synthetic NO, window 0x3600001,
root 0x60f, subw 0x0, time 1630131, (-175,845), root:(788,874),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 28, synthetic NO, window 0x3600001,
root 0x60f, subw 0x0, time 1630295, (-175,845), root:(788,874),
state 0x8, keycode 113 (keysym 0xff50, Home), same_screen YES,
XKeysymToKeycode returns keycode: 110
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 28, synthetic NO, window 0x3600001,
root 0x60f, subw 0x0, time 1630426, (-175,845), root:(788,874),
state 0x8, keycode 113 (keysym 0xff50, Home), same_screen YES,
XKeysymToKeycode returns keycode: 110
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 28, synthetic NO, window 0x3600001,
root 0x60f, subw 0x0, time 1630647, (-175,845), root:(788,874),
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
However, this doesn’t seem to produce the effect I want (moving caret to beginning of line)
I think something’s interfering, maybe the alt+left is recognized by someting else ? Do I have the wrong method for what I’m trying to achieve ?
Thanks in advance