Zoot_Nerper
July 10th, 2014, 06:12 PM
Hi Folks,
I am trying to map a key on the keypad to a key sequence. So, if I press "1" (End) on the keypad, I want the sequence "Alt_L + 1"
I am using Ubuntu 14.04
I have been using xev to find the key code. I get this:
KeyRelease event, serial 125, synthetic NO, window 0x6c00001,
root 0x299, subw 0x0, time 43140241, (107,121), root:(1849,173),
state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Then I kill xbindkeys and then restart it passing it a file with the following lines:
"xte 'keydown Alt_L' 'key 1' 'keyup Alt_L'"
c:87
But this does not work. xev shows a different output when I press the keypad "1" as follows:
FocusOut event, serial 126, synthetic NO, window 0x6c00001,
mode NotifyGrab, detail NotifyAncestor
MappingNotify event, serial 126, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
FocusOut event, serial 127, synthetic NO, window 0x6c00001,
mode NotifyUngrab, detail NotifyPointer
FocusIn event, serial 127, synthetic NO, window 0x6c00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 127, synthetic NO, window 0x0,
keys: 4294967193 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
So, something is happening, just not what I want.
I have used xev and xbindkeys before to successfully assign a key sequence to a mouse button.
Any ideas?
Thanks
I am trying to map a key on the keypad to a key sequence. So, if I press "1" (End) on the keypad, I want the sequence "Alt_L + 1"
I am using Ubuntu 14.04
I have been using xev to find the key code. I get this:
KeyRelease event, serial 125, synthetic NO, window 0x6c00001,
root 0x299, subw 0x0, time 43140241, (107,121), root:(1849,173),
state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Then I kill xbindkeys and then restart it passing it a file with the following lines:
"xte 'keydown Alt_L' 'key 1' 'keyup Alt_L'"
c:87
But this does not work. xev shows a different output when I press the keypad "1" as follows:
FocusOut event, serial 126, synthetic NO, window 0x6c00001,
mode NotifyGrab, detail NotifyAncestor
MappingNotify event, serial 126, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
FocusOut event, serial 127, synthetic NO, window 0x6c00001,
mode NotifyUngrab, detail NotifyPointer
FocusIn event, serial 127, synthetic NO, window 0x6c00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 127, synthetic NO, window 0x0,
keys: 4294967193 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
So, something is happening, just not what I want.
I have used xev and xbindkeys before to successfully assign a key sequence to a mouse button.
Any ideas?
Thanks