You are not logged in.

#1 2024-05-15 13:02:19

millus
Member
Registered: 2019-07-21
Posts: 220

[SOLVED] Mountain MacroPad (USB keypad)

I got my hands on a Mountain MacroPad, a mini USB keypad with 12 keys just labeled "M1" to "M12" and dubbed "macro keys".
The official drivers exist only for Windows 10/11.

--- Shortcut to the SOLUTION:
It's the C program 'mmp.c' I made towards the end of this posting, compile and run it with sudo and you're set. It contains all instructions in its source code.
It will detect the macropad and translate its M1-M12 keys to normally usable F13-F24 keys, or you can edit mmp.cfg to set any arbitrary commands, scripts or whatever to each key.

Additionally, at https://bbs.archlinux.org/viewtopic.php … 3#p2179803 I added instructions to make it a system service to autostart on startup.

Note that X11 by default incorrectly maps the F13-F24 keys. You have to edit /usr/share/X11/xkb/symbols/inet and modify/insert the wrong/missing entries.
For example OBS (open broadcaster software) will require this fix. I provided a diff file here, restart X after:
https://bbs.archlinux.org/viewtopic.php … 3#p2180633
Note that when xkb gets updated, the inet file will be overwritten so you have to reapply the changes.
---


On connecting I get this in dmesg:

 $ dmesg
[588196.313970] usb 3-6: new full-speed USB device number 6 using xhci_hcd
[588196.712326] usb 3-6: New USB device found, idVendor=3282, idProduct=0008, bcdDevice= 0.08
[588196.712329] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[588196.712331] usb 3-6: Product: MOUNTAIN MacroPad
[588196.712333] usb 3-6: Manufacturer: Mountain
[588196.740180] input: Mountain MOUNTAIN MacroPad as /devices/pci0000:00/0000:00:02.1/0000:02:00.0/0000:03:0c.0/0000:0e:00.0/usb3/3-6/3-6:1.0/0003:3282:0008.000A/input/input37
[588196.794080] hid-generic 0003:3282:0008.000A: input,hidraw8: USB HID v1.11 Keyboard [Mountain MOUNTAIN MacroPad] on usb-0000:0e:00.0-6/input0
[588196.800331] input: Mountain MOUNTAIN MacroPad Keyboard as /devices/pci0000:00/0000:00:02.1/0000:02:00.0/0000:03:0c.0/0000:0e:00.0/usb3/3-6/3-6:1.1/0003:3282:0008.000B/input/input38
[588196.854029] input: Mountain MOUNTAIN MacroPad Mouse as /devices/pci0000:00/0000:00:02.1/0000:02:00.0/0000:03:0c.0/0000:0e:00.0/usb3/3-6/3-6:1.1/0003:3282:0008.000B/input/input39
[588196.854103] hid-generic 0003:3282:0008.000B: input,hidraw9: USB HID v1.10 Keyboard [Mountain MOUNTAIN MacroPad] on usb-0000:0e:00.0-6/input1
[588196.858193] hid-generic 0003:3282:0008.000C: hiddev100,hidraw10: USB HID v1.11 Device [Mountain MOUNTAIN MacroPad] on usb-0000:0e:00.0-6/input2

and lsusb:

 $ lsusb
Bus 003 Device 006: ID 3282:0008 Mountain MOUNTAIN MacroPad

and for xinput:

 $ xinput
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech G502 X                         	id=9	[slave  pointer  (2)]
⎜   ↳ Logitech G502 X Keyboard                	id=10	[slave  pointer  (2)]
⎜   ↳ ROCCAT ROCCAT Vulcan II Max Mouse       	id=12	[slave  pointer  (2)]
⎜   ↳ ROCCAT ROCCAT Vulcan II Max Consumer Control	id=14	[slave  pointer  (2)]
⎜   ↳ Eruption Virtual Mouse                  	id=21	[slave  pointer  (2)]
⎜   ↳ Mountain MOUNTAIN MacroPad Mouse        	id=22	[slave  pointer  (2)]
⎜   ↳ Mountain MOUNTAIN MacroPad Keyboard     	id=24	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ ROCCAT ROCCAT Vulcan II Max             	id=11	[slave  keyboard (3)]
    ↳ Logitech G502 X Keyboard                	id=18	[slave  keyboard (3)]
    ↳ ROCCAT ROCCAT Vulcan II Max System Control	id=13	[slave  keyboard (3)]
    ↳ ROCCAT ROCCAT Vulcan II Max             	id=15	[slave  keyboard (3)]
    ↳ ROCCAT ROCCAT Vulcan II Max Consumer Control	id=19	[slave  keyboard (3)]
    ↳ Eruption Virtual Keyboard               	id=20	[slave  keyboard (3)]
    ↳ Asus WMI hotkeys                        	id=16	[slave  keyboard (3)]
    ↳ Eee PC WMI hotkeys                      	id=17	[slave  keyboard (3)]
    ↳ Mountain MOUNTAIN MacroPad              	id=23	[slave  keyboard (3)]
    ↳ Mountain MOUNTAIN MacroPad Keyboard     	id=25	[slave  keyboard (3)]

However, when I try to use xev, I don't get anything from any of the keys, except for the first one, labeled "M1". And a cascade of stuff happens if I press it. A webbroser tab gets opened and a bunch of keys and numbers is spammed. In order to record this I deleted all webbrowser-opening keyboard shortcuts from the keyboard settings so they don't interfere. Would be interested if there is a better method to temporarily ignore all keyboard shortcuts while reading key inputs. Here is the xev:

 $ xev
MappingNotify event, serial 37, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 37, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595314032, (631,-281), root:(1822,368),
    state 0x0, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595314040, (631,-281), root:(1822,368),
    state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 38, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 38, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595314042, (631,-281), root:(1822,368),
    state 0x10, keycode 180 (keysym 0x1008ff18, XF86HomePage), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 39, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595314049, (631,-281), root:(1822,368),
    state 0x10, keycode 180 (keysym 0x1008ff18, XF86HomePage), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 39, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 39, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315050, (631,-281), root:(1822,368),
    state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315057, (631,-281), root:(1822,368),
    state 0x14, keycode 46 (keysym 0x6c, l), same_screen YES,
    XLookupString gives 1 bytes: (0c) "
                                       "
    XmbLookupString gives 1 bytes: (0c) "
                                         "
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315113, (631,-281), root:(1822,368),
    state 0x14, keycode 46 (keysym 0x6c, l), same_screen YES,
    XLookupString gives 1 bytes: (0c) "
                                       "
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315114, (631,-281), root:(1822,368),
    state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315514, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315522, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315530, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315538, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315546, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315554, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XmbLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315562, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315563, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315572, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315579, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315587, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315595, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315603, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315611, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XmbLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315620, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315621, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315628, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315636, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315644, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315652, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315660, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315668, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XmbLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315676, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315677, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315685, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315693, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315701, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315710, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315717, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315725, (631,-281), root:(1822,368),
    state 0x18, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
    XLookupString gives 1 bytes: (32) "2"
    XmbLookupString gives 1 bytes: (32) "2"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315733, (631,-281), root:(1822,368),
    state 0x18, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
    XLookupString gives 1 bytes: (32) "2"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315734, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315742, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315750, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315758, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315766, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315774, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315782, (631,-281), root:(1822,368),
    state 0x18, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
    XLookupString gives 1 bytes: (35) "5"
    XmbLookupString gives 1 bytes: (35) "5"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315791, (631,-281), root:(1822,368),
    state 0x18, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
    XLookupString gives 1 bytes: (35) "5"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315792, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315800, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315807, (631,-281), root:(1822,368),
    state 0x18, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
    XLookupString gives 1 bytes: (35) "5"
    XmbLookupString gives 1 bytes: (35) "5"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315815, (631,-281), root:(1822,368),
    state 0x18, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
    XLookupString gives 1 bytes: (35) "5"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315823, (631,-281), root:(1822,368),
    state 0x18, keycode 80 (keysym 0xffb8, KP_8), same_screen YES,
    XLookupString gives 1 bytes: (38) "8"
    XmbLookupString gives 1 bytes: (38) "8"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315831, (631,-281), root:(1822,368),
    state 0x18, keycode 80 (keysym 0xffb8, KP_8), same_screen YES,
    XLookupString gives 1 bytes: (38) "8"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315832, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315840, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315848, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XmbLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315856, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315864, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XmbLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315872, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315873, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315881, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315890, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XmbLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315897, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315905, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XmbLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315913, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315914, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315922, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315930, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315938, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315946, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315954, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315962, (631,-281), root:(1822,368),
    state 0x18, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
    XLookupString gives 1 bytes: (39) "9"
    XmbLookupString gives 1 bytes: (39) "9"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315971, (631,-281), root:(1822,368),
    state 0x18, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
    XLookupString gives 1 bytes: (39) "9"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315972, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315980, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315987, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595315995, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316003, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316011, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316019, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316027, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316028, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316036, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316044, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316052, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316061, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316068, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316076, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XmbLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316084, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316085, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316093, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316101, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316109, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316117, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316125, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316133, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316142, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316143, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316151, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316158, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316166, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316174, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316182, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316190, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XmbLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316198, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316199, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316207, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316215, (631,-281), root:(1822,368),
    state 0x18, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
    XLookupString gives 1 bytes: (39) "9"
    XmbLookupString gives 1 bytes: (39) "9"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316223, (631,-281), root:(1822,368),
    state 0x18, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
    XLookupString gives 1 bytes: (39) "9"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316232, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XmbLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316239, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316241, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316248, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316256, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316264, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316272, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316280, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316288, (631,-281), root:(1822,368),
    state 0x18, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
    XLookupString gives 1 bytes: (35) "5"
    XmbLookupString gives 1 bytes: (35) "5"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316296, (631,-281), root:(1822,368),
    state 0x18, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
    XLookupString gives 1 bytes: (35) "5"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316297, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316305, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316313, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316322, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316329, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316337, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316345, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316353, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316354, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316362, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316370, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XmbLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316378, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316386, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XmbLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316394, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316395, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316403, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316412, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316419, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316427, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316435, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316443, (631,-281), root:(1822,368),
    state 0x18, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 bytes: (33) "3"
    XmbLookupString gives 1 bytes: (33) "3"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316451, (631,-281), root:(1822,368),
    state 0x18, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 bytes: (33) "3"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316452, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316460, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316468, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316476, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316484, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316492, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316500, (631,-281), root:(1822,368),
    state 0x18, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 bytes: (33) "3"
    XmbLookupString gives 1 bytes: (33) "3"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316508, (631,-281), root:(1822,368),
    state 0x18, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 bytes: (33) "3"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316509, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316517, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316525, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XmbLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316533, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316541, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XmbLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316550, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316551, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316558, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316566, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316574, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316582, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316590, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316598, (631,-281), root:(1822,368),
    state 0x18, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
    XLookupString gives 1 bytes: (35) "5"
    XmbLookupString gives 1 bytes: (35) "5"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316606, (631,-281), root:(1822,368),
    state 0x18, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
    XLookupString gives 1 bytes: (35) "5"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316607, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316615, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316623, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316631, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316640, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316647, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316655, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XmbLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316663, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316664, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316672, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316680, (631,-281), root:(1822,368),
    state 0x18, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
    XLookupString gives 1 bytes: (39) "9"
    XmbLookupString gives 1 bytes: (39) "9"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316688, (631,-281), root:(1822,368),
    state 0x18, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
    XLookupString gives 1 bytes: (39) "9"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316696, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XmbLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316704, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316705, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316713, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316721, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316730, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316737, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316745, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316753, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XmbLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316761, (631,-281), root:(1822,368),
    state 0x18, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 bytes: (34) "4"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316762, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316770, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316778, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316786, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316794, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316802, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316811, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XmbLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316818, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316820, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316827, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316835, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XmbLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316843, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316851, (631,-281), root:(1822,368),
    state 0x18, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 bytes: (33) "3"
    XmbLookupString gives 1 bytes: (33) "3"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316859, (631,-281), root:(1822,368),
    state 0x18, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 bytes: (33) "3"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316860, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316868, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316876, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316884, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316892, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316901, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316908, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XmbLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316916, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316917, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316925, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316933, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316941, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316949, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316957, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316965, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XmbLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316973, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316974, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316982, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316991, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595316998, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317006, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317014, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317022, (631,-281), root:(1822,368),
    state 0x18, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
    XLookupString gives 1 bytes: (39) "9"
    XmbLookupString gives 1 bytes: (39) "9"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317030, (631,-281), root:(1822,368),
    state 0x18, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
    XLookupString gives 1 bytes: (39) "9"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317031, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317039, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317047, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XmbLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317055, (631,-281), root:(1822,368),
    state 0x18, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
    XLookupString gives 1 bytes: (36) "6"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317063, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317072, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317073, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317081, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317088, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317096, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317104, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317112, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317120, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317128, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317129, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317137, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317145, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317153, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317162, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317169, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317177, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XmbLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317185, (631,-281), root:(1822,368),
    state 0x18, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
    XLookupString gives 1 bytes: (37) "7"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317186, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317194, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317202, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317210, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317218, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317226, (631,-281), root:(1822,368),
    state 0x18, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317234, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317242, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317243, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317252, (631,-281), root:(1822,368),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317259, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317267, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317275, (631,-281), root:(1822,368),
    state 0x18, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
    XLookupString gives 1 bytes: (32) "2"
    XmbLookupString gives 1 bytes: (32) "2"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317283, (631,-281), root:(1822,368),
    state 0x18, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
    XLookupString gives 1 bytes: (32) "2"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317291, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317300, (631,-281), root:(1822,368),
    state 0x18, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317301, (631,-281), root:(1822,368),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317308, (631,-281), root:(1822,368),
    state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317316, (631,-281), root:(1822,368),
    state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317317, (631,-281), root:(1822,368),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
"   XmbLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0xd400001,
    root 0x1e1, subw 0x0, time 595317325, (631,-281), root:(1822,368),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

So I'm just guessing the M1 key has a default macro on it that would on Windows open the webbrowser and enter some vendor URL for driver/UI download.

However, this hardware seems to get recognized just fine by arch, so I wonder if there isn't a "relatively easy" way to use this keypad? How would I start this endeavour?
My idea is that it'd already be enough if I could read values from some /dev or /proc stuff.

Edit:
Ah, locate doesn't locate the inputXX files so I needed to use 'find' to find them :-p.
Well, tapping into those inpuiXX devs didn't help tho.
The only thing actually producing anything for other than the preprogrammed M1 key  I found so far is
/dev/usb/hiddev0
which actually outputs something for each key pressed!
However, unfortunately it also outputs additionally the predefined key spam macro on pressing particularly the M1 key, which in turn toggles stuff o_o if this could be disabled somehow..

So I can capture key presses on the M2-M12 keys fine at least, will combine it with xdotool to translate them to key presses F13..F24 (or anything you define in mmp.cfg if you like) so they become usable for any app. smile

For the M1 key, I wonder can I somehow un-register this USB keypad as actual "keyboard", so the system no longer receives the keys it sends? That way I could purely operate via hiddev0 and the predefined key spam would just go to nirvana/get discarded/ignored perhaps? yikes

Edit2:
Yay, it seems to work smile
I checked

 $ lsusb
Bus 003 Device 006: ID 3282:0008 Mountain MOUNTAIN MacroPad

and added a file
/etc/udev/rules.d/99-mountainmacropad.rules

SUBSYSTEM=="input", ACTION=="add", ATTRS{idVendor}=="3282", ATTRS{idProduct}=="0008", RUN+="/bin/sh -c 'echo remove > /sys$env{DEVPATH}/uevent'"
ACTION=="add", ATTRS{idVendor}=="3282", ATTRS{idProduct}=="0008", SYMLINK+="mmpkeyboard"

to un-bind it as normal keyboard (and put it to an arbitrary /dev/mmpkeyboard device just in case) and sure enough the macro spam from M1 key is no longer received by the system, but it still generates stuff at /dev/usb/hiddev0 as usual. smile
After writing that rules file I also did

$ udevadm control --reload-rules && udevadm trigger

and replugged the keyboard, not sure if all of this is actually necessary...
Remember the "mmpkeyboard" symlink name as you can use it to verify you are querying the correct /usb/dev/hiddevN (usually N is 0 but make sure):

udevadm info --query=symlink -n /dev/usb/hiddev0

should return the "mmpkeyboard" symlink we defined in the udev rules above,if it doesn't check the other hiddevN devices until you find the correct one.

I kinda feel like I'm writing a device driver or sth here oO'

Edit3:
Amg, it WORKS, pressing the keys now is recognized by the system as F13..F24. :ooo
Edit agane: I implemented the key mask checks, so all keys can now be pressed together as you like.

Here are details of what I did - THIS (ie generation of .bin files) IS NO LONGER NECESSARY WITH THE UPDATED C PROGRAM IN THIS POST, AS IT HAS EVERYTHING HARDCODED INSIDE IT:
First, run

$ cat /dev/usb/hiddev0 > mountainmacropad.bin

and press each key once. That will result in 1024 bytes per key press, of which the first 512 happen for key-down and the next 512 happen for key-up event respectively. So the whole thing should be 12x512x2 = 12288 bytes in total. Note that there are null bytes, so careful that you don't treat it as normal null-terminated strings anywhere. Use hexdump and xxd where appropriate.
Next I used

$ split mountainmacropad.bin -b 512

to get all the actual keyup/down events for each key, ending up with 24 files accordingly.
I named them

$ ls mmp-*.bin
mmp-M10-down.bin  mmp-M11-down.bin  mmp-M12-down.bin  mmp-M1-down.bin  mmp-M2-down.bin  mmp-M3-down.bin  mmp-M4-down.bin  mmp-M5-down.bin  mmp-M6-down.bin  mmp-M7-down.bin  mmp-M8-down.bin  mmp-M9-down.bin
mmp-M10-up.bin    mmp-M11-up.bin    mmp-M12-up.bin    mmp-M1-up.bin    mmp-M2-up.bin    mmp-M3-up.bin    mmp-M4-up.bin    mmp-M5-up.bin    mmp-M6-up.bin    mmp-M7-up.bin    mmp-M8-up.bin    mmp-M9-up.bin

At first I tried to use a bash script to read from hiddev0 and process it against these files but it was a hassle so I switched to C and made this
NOTE: You no longer need to generate any .bin files,  the current version of mmp.c does everything needed on its own.

/* File 'mmp.c':
   Translate proprietary M1-M12 keys on the Mountain MacroPad to generic F13-F24 keys, respecting keypress and keyrelease events.
   Supports a custom config file 'mmp.cfg' for any custom system calls instead of xdotool-F-keys.
   Each line of the config file must not exceed 2048 bytes.

   Requires xdotool to be installed for using default settings.
   Requires udevadm.
   Requires read/write access in /tmp/.
   Requires read access to /dev/usb/hiddev* devices, so we must be run as root.
   You need to add the udev rules as written below, especially to create the 'mmpkeyboard' symlink.

   Compile with:   gcc mmp.c -o mmp
   and run with:   sudo ./mmp

   Optional command-line parameters:

    -h
        Help. Display all command-line options and most of this comment text here and terminate.

    -c  <filename>
        Specify config file instead of using default (mmp.cfg in current working directory).
        Filename must not exceed 1024 bytes.

    -k
        Instead of translating keydown+keyup events, just perform a single keypress event on keydown.
        Use this especially if anything should bug out/hang/freeze your keyboard.
        Example usage:  sudo ./mmp -k

    -d
        Just a debug run? With printf outputs but without actually calling xdotool to press/release any keys.
        Example usage:  sudo ./mmp -d

    -t  <number of attempts>
        Tries to find the pad on USB on startup, default is 15. Specify 0 for infinite retries.
        There is a 1 second delay after each try.

    -q
        Quiet operation: No text log output (stdout) for key events.

    Also, unbind the macropad as a keyboard to disable the predefined M1-key macro, and define it as 'mmpkeyboard' symlink:
    Run 'lsusb' to check vendor+device IDs:
     Bus 003 Device 006: ID 3282:0008 Mountain MOUNTAIN MacroPad

    and add a file
     /etc/udev/rules.d/99-mountainmacropad.rules
    with content:

     SUBSYSTEM=="input", ACTION=="add", ATTRS{idVendor}=="3282", ATTRS{idProduct}=="0008", RUN+="/bin/sh -c 'echo remove > /sys$env{DEVPATH}/uevent'"
     ACTION=="add", ATTRS{idVendor}=="3282", ATTRS{idProduct}=="0008", SYMLINK+="mmpkeyboard"

    and reboot (or reload udev rules, but rebooting is safest+easiest).

   Using this command on all devices in /dev/usb/ will tell you if it's really hiddev0 or some other device:
    udevadm info --query=symlink -n /dev/usb/hiddevN
   where you use N=0 and work your way through them until you find the "mmpkeyboard" symlink we defined in the udev rules for the macropad.
*/


#include <stdio.h>	// for fopen(), fread(). fclose(), FILE, printf(), sprintf()
#include <unistd.h>	// for STDIN_FILENO constant, optionally for sleep()
#include <string.h>	// for strcmp()
#include <stdlib.h>	// for system()
#include <dirent.h>	// for opendir(), readdir(), closedir(), dirent

#define EVSIZE 512

/* Events:
    On keypress, and keyrelease, 512 Bytes are sent from the hardware over USB (/dev/usb/hiddev0).

   Line pattern, variables indicated as '$n', in hex:
   02 00 00 ff  $1 00 00 00  02 00 00 ff  $2 00 00 00
   this line of 16 bytes is repeated 32 times,
   Lines are numbered #0 to #31 here, decimally.

   On keypress or keyrelease, the same kind of 512B event is fired:
    $1 and $2 are usually 00, except:
    line #00: $1 is 01.
    line #21: $1 is a mask consisting of the state of the first 7 M-keys (M1-M7):
     M1 +2, M2 +4, M3 +8, M4 +10, M5 +20, M6 +40, M7 +80 (hex)
    line #23: $2 is a mask consisting of the state of the last 5 M-keys (M8-M12):
     M8 +1, M9 +2, M10 +4, M11 +8, M12 +10 (hex)
    (If no matching keys are pressed, $1 and $2 respectively are 00, obviously.)
*/

#define SYSCALLLEN 80
#define CFG_LINE 2048

int main(int argc, char **argv) {
    char syscall[SYSCALLLEN], hiddev[40] = { 0 };

    /*                                   02    00    00    ff     $1    00    00    00     02    00    00    ff    $2    00    00    00 */
    unsigned char mkey0[16]        = { 0x02, 0x00, 0x00, 0xff,  0x01, 0x00, 0x00, 0x00,  0x02, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00 };
    unsigned char mkeyN[16]        = { 0x02, 0x00, 0x00, 0xff,  0x00, 0x00, 0x00, 0x00,  0x02, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00 };

    unsigned char usb_byte, buf[EVSIZE + 1] = { 0 }, mask1, mask2, mask1_prev = 0, mask2_prev = 0;
    int n, m, bit, bitmask;

    int f_dryrun = 0, f_keypress = 0, quiet = 0, usbhiddev_tries;

    char macrokey_syscall[3 * 12][CFG_LINE], cfg_tmp[CFG_LINE], cfg_file[1024];

    FILE *fp;
    DIR *dp;
    struct dirent *ep;


    printf("POSIX Mountain MacroPad driver v1.3 (by millus, 2024-06-29)\n");

    /* Evaluate optional command-line parameters */
    strcpy(cfg_file, "mmp.cfg");
    usbhiddev_tries = 15;

    for (n = 0; n < argc; n++) {
        if (!strcmp(argv[n], "-k")) {
            printf("Using singular keypress events instead of keyup/keydown.\n");
            f_keypress = 1;
        }
        if (!strcmp(argv[n], "-d")) {
            printf("Running in dry-run mode, not generating actual key events.\n");
            f_dryrun = 1;
        }
        if (!strcmp(argv[n], "-c")) {
            n++;
            if (n == argc || !argv[n][0]) {
                printf("Error: Missing config file name after '-c'.\n");
                return(-4);
            }
            strcpy(cfg_file, argv[n]);
        }
        if (!strcmp(argv[n], "-t")) {
            n++;
            if (n == argc || !argv[n][0]) {
                printf("Error: Missing amount of tries after '-t'.\n");
                return(-5);
            }
            if (atoi(argv[n]) < 0) {
                printf("Error: Number of tries must be positive (0 for 'infinite').\n");
                return(-6);
            }
            usbhiddev_tries = atoi(argv[n]);
        }
        if (!strcmp(argv[n], "-q")) quiet = 1;
        if (!strcmp(argv[n], "-h") || !strcmp(argv[n], "--help")) {
printf("\n"
"   Translate proprietary M1-M12 keys on the Mountain MacroPad to generic F13-F24 keys, respecting keypress and keyrelease events.\n"
"   Supports a custom config file 'mmp.cfg' for any custom system calls instead of xdotool-F-keys.\n"
"   Each line of the config file must not exceed 2048 bytes.\n"
"\n"
"   Requires xdotool to be installed for using default settings.\n"
"   Requires udevadm.\n"
"   Requires read/write access in /tmp/.\n"
"   Requires read access to /dev/usb/hiddev* devices, so we must be run as root.\n"
"   You need to add the udev rules as written below, especially to create the 'mmpkeyboard' symlink.\n"
"\n"
"   Optional command-line parameters:\n"
"\n"
"    -h\n"
"        Display this help text and terminate.\n"
"\n"
"    -c  <filename>\n"
"        Specify config file instead of using default (mmp.cfg in current working directory).\n"
"        Filename must not exceed 1024 bytes.\n"
"\n"
"    -k\n"
"        Instead of translating keydown+keyup events, just perform a single keypress event on keydown.\n"
"        Use this especially if anything should bug out/hang/freeze your keyboard.\n"
"        Example usage:  sudo ./mmp -k\n"
"\n"
"    -d\n"
"        Just a debug run? With printf outputs but without actually calling xdotool to press/release any keys.\n"
"        Example usage:  sudo ./mmp -d\n"
"\n"
"    -t  <number of attempts>\n"
"        Tries to find the pad on USB on startup, default is 15. Specify 0 for infinite retries.\n"
"        There is a 1 second delay after each try.\n"
"\n"
"    -q\n"
"        Quiet operation: No text log output (stdout) for key events.\n"
"\n"
"    Also, unbind the macropad as a keyboard to disable the predefined M1-key macro, and define it as 'mmpkeyboard' symlink:\n"
"    Run 'lsusb' to check vendor+device IDs:\n"
"     Bus 003 Device 006: ID 3282:0008 Mountain MOUNTAIN MacroPad\n"
"\n"
"    and add a file\n"
"     /etc/udev/rules.d/99-mountainmacropad.rules\n"
"    with content:\n"
"\n"
"     SUBSYSTEM==\"input\", ACTION==\"add\", ATTRS{idVendor}==\"3282\", ATTRS{idProduct}==\"0008\", RUN+=\"/bin/sh -c 'echo remove > /sys$env{DEVPATH}/uevent'\"\n"
"     ACTION==\"add\", ATTRS{idVendor}==\"3282\", ATTRS{idProduct}==\"0008\", SYMLINK+=\"mmpkeyboard\"\n"
"\n"
"    and reboot (or reload udev rules, but rebooting is safest+easiest).\n"
"\n");
        return(0);
        }
    }
    if (!usbhiddev_tries) printf("Retrying forever until the pad is found on USB.\n");
    else printf("Trying up to %d times to find the pad on USB.\n", usbhiddev_tries);
    printf("Using config file: %s\n", cfg_file);

    /* Read custom xdo event config */
    m = 0;
    fp = fopen(cfg_file, "r");
    if (fp) {
        while (fgets(cfg_tmp, CFG_LINE, fp)) {
            if (!cfg_tmp[0] || cfg_tmp[0] == '#' || cfg_tmp[0] == '\n') continue;
            strcpy(macrokey_syscall[m++], cfg_tmp);
        }
        fclose(fp);
        if (!m) printf("Warning: Config file '%s' contains no entries!\n", cfg_file);
        else printf("Read %d entries from config file '%s'.\n", m, cfg_file);
    } else {
        printf("Config file '%s' not found, generating one with defaults.\n", cfg_file);
        fp = fopen(cfg_file, "w");
        if (fp) {
            fprintf(fp, "# Config file for 'mmp', containing 36 lines in total:\n");
            fprintf(fp, "# Two system calls per key: 'Press down' and 'release', 2x12 = 24 lines.\n");
            fprintf(fp, "# One system call per key press when '-k' is specified, another 12 lines\n");
            fprintf(fp, "# Empty lines and lines starting on '#' are ignored.\n\n");
            fprintf(fp, "# 12 keys a 2 lines for normal operation:\n\n");
            for (n = 13; n <= 24; n++) fprintf(fp, "xdotool keydown F%d\nxdotool keyup F%d\n", n, n);
            fprintf(fp, "\n# 12 keys a 1 lines for operation under '-k' command-line option:\n\n");
            for (n = 13; n <= 24; n++) fprintf(fp, "xdotool key F%d\n", n);
            fclose(fp);
        } else printf("Warning: Unable to generate default config file '%s'.\n", cfg_file);
    }
    if (!m) {
        printf("Using default settings (xdotool keyup/keydown F13-F24 and key F13-F24).\n");
        for (n = 0; n < 12; n++) {
            sprintf(macrokey_syscall[n * 2], "xdotool keydown F%d\n", n + 13);
            sprintf(macrokey_syscall[n * 2 + 1], "xdotool keyup F%d\n", n + 13);
            sprintf(macrokey_syscall[n + 12 * 2], "xdotool key F%d\n", n + 13);
        }
    }

    /* Read all /dev/usb/hiddevN devices and scan which one is the correct one, assuming 'mmpkeyboard' from udev rules above. */
    /* Loop until the devices are ready. This is needed if we're called early, on system startup: */
    n = 0;
    while(n++ < usbhiddev_tries || !usbhiddev_tries) {
        dp = opendir("/dev/usb/");
        if (dp != NULL) {
            while((ep = readdir(dp)) != NULL) {
                if (!strstr(ep->d_name, "hiddev")) continue;
                printf("Checking %s .. ", ep->d_name);
                sprintf(syscall, "udevadm info --query=symlink -n /dev/usb/%s > /tmp/mmp.txt", ep->d_name);
                system(syscall);
                fp = fopen("/tmp/mmp.txt", "r");
                if (!fp) {
                    printf("Error: Cannot access /tmp/mmp.txt\n");
                    return(-6);
                }
                fgets(syscall, SYSCALLLEN, fp);
                fclose(fp);
                remove("/tmp/mmp.txt");
                syscall[strlen(syscall) - 1] = 0; //trim linefeed
                if (!strcmp(syscall, "mmpkeyboard")) {
                    printf("found 'mmpkeyboard' - Ok!\n");
                    sprintf(hiddev, "/dev/usb/%s", ep->d_name);
                    break;
                }
                else printf("'mmpkeyboard' not found.\n");
            }
            (void)closedir(dp);

            if (hiddev[0]) {
                printf("Mountain MacroPad found at %s\n", hiddev);
                break;
            }
            printf("Error: None of the /dev/usb/hiddevN devices was 'mmpkeyboard' (udev rules).\n");
        } else perror("Couldn't open /dev/usb/ directory");

        /* usbhiddev_tries != 1: Instead of quitting, we wait a bit and retry,
           in case the devices weren't ready yet (system startup phase) */
        if (!usbhiddev_tries) {
            printf("Attempt %d, retrying in 1s...\n", n);
            sleep(1);
            continue;
        } else if (n < usbhiddev_tries) {
            printf("Attempt %d of %d max, retrying in 1s...\n", n, usbhiddev_tries);
            sleep(1);
            continue;
        } else {
            printf("Attempt %d of %d max.\n", usbhiddev_tries, usbhiddev_tries);
            return(-2);
        }
    }

    /* This file access to /dev/usb/hiddevN requires root access usually and is therefore the reason why we must be run as root: */
    fp = fopen(hiddev, "r");
    if (!fp) {
        perror("Couldn't open the hiddev file");
        printf("Access requires root. Run this program with sudo: 'sudo ./mmp'.\n");
        return(-3);
    }

    if (!quiet) printf("\n");
    /* Loop forever, translating the M-key presses from /dev/usb/hiddevN to system calls (default: keyboard key events F13-24 via xdotool): */
    while(1) {
        usb_byte = fgetc(fp);

        for (n = 1; n < EVSIZE; n++) buf[n - 1] = buf[n];
        buf[EVSIZE - 1] = usb_byte;
        if (!buf[0]) continue;


        /* we read 512 Bytes, evaluate.. */
        //printf("Read EVSIZE bytes.\n");

        mask1 = mask2 = 0;

        for (n = 0; n < 32; n++) {
            switch (n) {
            case 0:
                if (!memcmp(buf, mkey0, 16)) continue;
                n = -1; //failure
                break;
            case 21:
                mask1 = buf[21 * 16 + 4];
                if (!memcmp(buf +  21 * 16, mkeyN, 4) && !memcmp(buf +  21 * 16 + 5, mkeyN + 5, 11)) continue;
                n = -1; //failure
                break;
            case 23:
                mask2 = buf[23 * 16 + 12];
                if (!memcmp(buf +  23 * 16, mkeyN, 12) && !memcmp(buf +  23 * 16 + 13, mkeyN + 13, 3)) continue;
                n = -1; //failure
                break;
            default:
                if (!memcmp(buf + n * 16, mkeyN, 16)) continue;
                n = -1; //failure
                break;
            }
            if (n == -1) break; //failure
        }
        /* failure: didn't detect MacroPad key event pattern */
        if (n == -1) {
            memset(buf, 0, sizeof(buf));
            continue;
        }

        /* success */
        //printf("M-mask 1: %#02x, M-mask 2: %#02x\n", mask1, mask2);

        /* scan for changes in key-holdings^^ */
        for (bit = 1; bit < 8; bit++) {
            bitmask = 0x1 << bit;

            /* no change in key-pressed state? */
            if ((mask1 & bitmask) == (mask1_prev & bitmask)) continue;

            if (mask1 & bitmask) {
                if (!quiet) printf("Pressed M%d.\n", bit);
                if (f_keypress)
                    sprintf(syscall, "%s", macrokey_syscall[bit - 1 + 12 * 2]); // key ('-k')
                else
                    sprintf(syscall, "%s", macrokey_syscall[(bit - 1) * 2]); // keydown
                if (!quiet) printf("Syscall: %s\n", syscall);
                if (!f_dryrun) system(syscall);
            } else {
                if (!quiet) printf("Released M%d.\n", bit);
                if (!f_keypress) {
                    sprintf(syscall, "%s", macrokey_syscall[(bit - 1) * 2 + 1]); // keyup
                    if (!quiet) printf("Syscall: %s\n", syscall);
                    if (!f_dryrun) system(syscall);
                }
            }
        }
        for (bit = 0; bit < 5; bit++) {
            bitmask = 0x1 << bit;

            /* no change in key-pressed state? */
            if ((mask2 & bitmask) == (mask2_prev & bitmask)) continue;

            if (mask2 & bitmask) {
                if (!quiet) printf("Pressed M%d.\n", bit + 8);
                if (f_keypress)
                    sprintf(syscall, "%s", macrokey_syscall[bit - 1 + 8 + 12 * 2]); // key ('-k')
                else
                    sprintf(syscall, "%s", macrokey_syscall[(bit - 1 + 8) * 2]); // keydown
                if (!quiet) printf("Syscall: %s\n", syscall);
                if (!f_dryrun) system(syscall);
            } else {
                if (!quiet) printf("Released M%d.\n", bit + 8);
                if (!f_keypress) {
                    sprintf(syscall, "%s", macrokey_syscall[(bit - 1 + 8) * 2 + 1]); // keyup
                    if (!quiet) printf("Syscall: %s\n", syscall);
                    if (!f_dryrun) system(syscall);
                }
            }
        }

        /* remember current M-keys' state, to compare for changes in the future */
        mask1_prev = mask1;
        mask2_prev = mask2;
        /* clean up to prepare for next key event */
        memset(buf, 0, sizeof(buf));
    }
}

and that's it >_>. Compile with

gcc mmp.c -o mmp

and run the program in the background like this

$ sudo ./mmp

(you need sudo to be allowed to read from hiddevX).
Or, for true background execution without any terminal windows

sudo /bin/sh -c 'nohup ./mmp &'

and voila you can use the pad, you just need the package "xdotool" installed so it can generate keys (F13-F24) with it. smile - or anything else you prefer, by editing mmp.cfg file.
Edit: I fixed the key masks, so multiple keys can now be pressed simultaneously.
Also TODO: Find out clear connection between the device and why it's exactly /dev/usb/hiddev0 o_o'
Too bad you cannot attach files to forum posts or I'd just add the 4k tar.bz2 file containing all of this stuff here.

Uh, SO,...

Mountain MacroPad unofficially partially supported by Archlinux now! :-p (wonder if anyone reads this '>.>)

Last edited by millus (2024-07-05 18:35:38)

Offline

#2 2024-05-21 13:13:16

millus
Member
Registered: 2019-07-21
Posts: 220

Re: [SOLVED] Mountain MacroPad (USB keypad)

(+Shameless bump, in case anyone is actually using the Mountain MacroPad and saw this posting before I added a solution, so he won't keep it in mind discarded but actually notice the new state.)

Offline

#3 2024-05-25 12:30:42

ciyasi5109
Member
Registered: 2024-05-25
Posts: 1

Re: [SOLVED] Mountain MacroPad (USB keypad)

Hi,

I'm considering buying the same macropad. I assume that without its priorietary software it is not possible to control the RGB lights, so I wonder what the lights do out of the box. Are they off, are they on or are they flashing?

Thanks!

Offline

#4 2024-05-27 09:58:18

millus
Member
Registered: 2019-07-21
Posts: 220

Re: [SOLVED] Mountain MacroPad (USB keypad)

Right, that's the remaining issue actually -_- the RGB LEDs are flashing fast and randomly in all colours, out of the box lol.
That said, it's actually not bothering me at all, to my own surprise xD.

To control the RGBs you could maybe try setting up a Windows VM in https://wiki.archlinux.org/title/VirtualBox or something to actually utilize the Windows software to turn it off. I would assume the hardware remembers the setting so it's not resetting on every reboot - just a guess but that's how it usually works, no?

Edit:
Actually seeing someone else even considering getting the keypad too spurred me to fully implement the device as far as I can ^^ (read: Pressing any keys in any combination, but cannot do anything about the RGB stuff soz)
I updated my OP; specifically my C program. It now fully supports the key masks, so you can press/release all kinds of M-keys at once as you like. And you no longer need to generate those .bin files, it's all hardcoded inside the C file now.
Should anything ever get stuck, for unknown reasons, I don't see why it would, I still added a fallback mechanism: Specify a command-line parameter "-k" and instead of keydown and keyup it will just generate the safe "key" aka keypress events that cannot get stuck/freeze your keyboard.^^

Last edited by millus (2024-05-29 08:10:14)

Offline

#5 2024-05-30 12:03:36

millus
Member
Registered: 2019-07-21
Posts: 220

Re: [SOLVED] Mountain MacroPad (USB keypad)

I added the final missing link, which was indeed via the symlink we created in the udev rules - the connection from our macropad to the /dev/usb/hiddev0:

udevadm info --query=symlink -n /dev/usb/hiddevN

can be called on all devices N=0,1,2 etc in /dev/usb/ to find out which one is our "mmpkeyboard", usually it should just be /dev/usb/hiddev0, but this makes it clear.

I improved the C program so it no longer needs piping to, it just figures out the correct hiddev on its own and reads from it.
However, it's important that you define the udev rules as stated, so it can find the 'mmpkeyboard' device.
Also, it needs root to read from /dev/usb/ so it must be run with sudo.

Last edited by millus (2024-05-30 12:54:00)

Offline

#6 2024-06-24 17:04:17

millus
Member
Registered: 2019-07-21
Posts: 220

Re: [SOLVED] Mountain MacroPad (USB keypad)

Addition: Making the mmp driver autostart on system startup:

We use the folder /usr/local/bin/ instead of /usr/bin/ because I don't like to spam own custom stuff into the repo-installed stuff.
So if you don't have it, create it. (For this script it's not needed to actually include it to the $PATH as we strictly reference all locations.)

Create a file:

/etc/systemd/system/mmp.service

[Unit]
Description=Mountain MacroPad driver
[Service]
ExecStart=/usr/local/bin/mmp.sh
Type=forking
[Install]
WantedBy=multi-user.target

place the "mmp" binary into /usr/local/bin too

and create the /usr/bin/mmp.sh file:

#!/bin/sh
export DISPLAY=:0.0
export XAUTHORITY=/home/<YOURUSER>/.Xauthority
sleep 5  # You can safely DELETE this line, as I have meanwhile edited mmp.c to auto-retry for 15 seconds
/bin/sh -c 'nohup /usr/local/bin/mmp &'

this script needs to refer an .XAuthority file. The root user probably doesn't have one, so just refer your user and substitute <YOURUSER> with your user name.
The ¨sleep 5" is needed because this script will (at least on my system) execute faster than udev rules are applied, so the macro pad will not yet be ready as usb-hiddev device and mmp will fail to find it and terminate.
However, a short time after writing the above paragraph I have edited mmp.c to do 15s of auto-retrying if needed, so this sleep5-line is now obsolete and you can delete it.

Finally, install and enable:

sudo systemctl daemon-reload
sudo systemctl enable mmp.service
sudo systemctl start mmp.service

and verify it started up fine and process is running with

systemctl status mmp.service
ps -ef | grep mmp

Finally, try hitting some keys on the macro pad, the cursor in a terminal should flicker, but the key don't have representative chars so you won't see anything. For some reason I saw a tilda printed on my system sometimes in terminal, and sometimes not, lol. (no idea why)
Now after pressing some pad keys, check the status again to see if any error messages showed up in the log. There shouldn't be any, ie the two lines at the bottom should just say "starting" + "started":

$ systemctl status mmp.service
● mmp.service - Mountain MacroPad driver
     Loaded: loaded (/etc/systemd/system/mmp.service; enabled; preset: disabled)
     Active: active (running) since Tue 2024-06-25 10:50:12 CEST; 1min 34s ago
    Process: 33023 ExecStart=/usr/local/bin/mmp.sh (code=exited, status=0/SUCCESS)
   Main PID: 33025 (mmp)
      Tasks: 1 (limit: 76771)
     Memory: 212.0K (peak: 2.0M)
        CPU: 29ms
     CGroup: /system.slice/mmp.service
             └─33025 /usr/local/bin/mmp

Jun 25 10:50:12 archlinux systemd[1]: Starting Mountain MacroPad driver...
Jun 25 10:50:12 archlinux systemd[1]: Started Mountain MacroPad driver.

An easy way of verifying usability of the macropad is to use (xfce4) system settings -> keyboard -> application shortcuts and try to set the macro pad keys for any custom command in there. They should get recognized as F13...F24.

EDIT:
I changed the mmp.c program to include 14x auto-retry after 1 s delay if it cannot find the usb devices right away, this should alleviate any need for a 'sleep' in scripts.
So just delete the "sleep 5" line again.

Hm, I guess would be cool to make some AUR package out of this stuff. No idea how that works tho =_=.

Last edited by millus (2024-06-25 09:03:27)

Offline

#7 2024-06-28 20:28:57

millus
Member
Registered: 2019-07-21
Posts: 220

Re: [SOLVED] Mountain MacroPad (USB keypad)

I improved the mmp.c file in the op again:
It now supports a custom cfg file, mmp.cfg, where all system calls can be set arbitrarily, not necessarily to xdotool calls.
So you could directly bind any commands or scripts to keys if you like.
It still distinguishes between key-down, key-up and (if you use "-k" command-line switch) keypress events, for a total of 3x12 = 36 different system calls.

Edit:
Also allows specifying a custom config file name with "-c" command-line arg.

Edit:
Added version number, bumped to 1.2.
Added options "-h" for help, "-q" for quiet operation, -"t" to specify # of retries to find the pad on usbhiddev (0 for unlimited).

Edit:
Version 1.3: Also retry if /dev/usb itself isn't available yet.

Edit:
I noticed that some apps do not recognize F13-F24 keys on X11.
The xfce4 keyboard settings do recognize them fine.
But for example OBS doesn't!
So I had a look at /usr/share/X11/xkb/symbols/inet and sure enough the FK13+ entries are weird and the last bunch of keys missing completely.
To fix that and restore F13-24 to actual F13-24 keys for all apps, apply this diff or edit the F13+ entries manually:

--- /usr/share/X11/xkb/symbols/inet.org	2024-07-02 00:46:29.900495973 +0200
+++ /usr/share/X11/xkb/symbols/inet	2024-07-02 00:46:54.470198907 +0200
@@ -190,12 +190,18 @@
     key <I372>  {       [ XF86Favorites          ]       };
     key <I382>  {       [ XF86Keyboard           ]       };
 
-    key <FK13>   {      [ XF86Tools         ]       };
-    key <FK14>   {      [ XF86Launch5       ]       };
-    key <FK15>   {      [ XF86Launch6       ]       };
-    key <FK16>   {      [ XF86Launch7       ]       };
-    key <FK17>   {      [ XF86Launch8       ]       };
-    key <FK18>   {      [ XF86Launch9       ]       };
+    key <FK13>   {      [ F13               ]       };
+    key <FK14>   {      [ F14               ]       };
+    key <FK15>   {      [ F15               ]       };
+    key <FK16>   {      [ F16               ]       };
+    key <FK17>   {      [ F17               ]       };
+    key <FK18>   {      [ F18               ]       };
+    key <FK19>   {      [ F19               ]       };
+    key <FK20>   {      [ F20               ]       };
+    key <FK21>   {      [ F21               ]       };
+    key <FK22>   {      [ F22               ]       };
+    key <FK23>   {      [ F23               ]       };
+    key <FK24>   {      [ F24               ]       };
 
    // Key symbol mappings below are autogenerated
    key <I170>   {       [ XF86Eject                      ]      }; // KEY_EJECTCLOSECD

and restart X.
Now the F13-F24 keys work fine for example in OBS, as hotkeys to start/stop streaming and recording etc. smile

Note that when xkb gets updated, the inet file will be overwritten so you have to reapply the changes.

Last edited by millus (2024-07-05 18:35:52)

Offline

#8 2024-09-30 12:24:49

Mmoudry
Member
Registered: 2024-09-08
Posts: 1

Re: [SOLVED] Mountain MacroPad (USB keypad)

Hi Millus,
Thanks so much for this piece of code. The fact that you created this code made me buy the Macropad to control the starting/stopping of Windows VMs on my Proxmox desktop like gaming VM or programming VM.

Hats off to your programming skills.

Once finished, I will share my Proxmox VM scripts here, in case anybody else tries to solve the same problem (switching from one VM passed through GPU/Keyboard to another VM without using the web interface or mobile app).

Regards,

M

Last edited by Mmoudry (2024-10-01 12:05:02)

Offline

Board footer

Powered by FluxBB