Nice solution is here, and I can only add that you can map the keys to unused X keys like that:
$ cat /lib/udev/rules.d/95-keymap.rules
...
ENV{ID_VENDOR}=="Microsoft", ENV{ID_MODEL_ID}=="00db", RUN+="keymap $name 0xc022d katakana 0xc022e katakanahiragana
...
Proper names to use instead of katakana
can be found here.
After reboot ;-) you can test that zoomin
and zoomout
keys are mapped successfully, and also to find out a proper names of the keys (to use in rc.xml
for OpenBox WM, for example) using xev
:
$ xev
...
KeyRelease event, serial 46, synthetic NO, window 0x3c00001,
root 0x291, subw 0x0, time 1492891, (-261,-61), root:(573,380),
state 0x0, keycode 101 (keysym 0xff27, Hiragana_Katakana), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
...
Now you can connect new keys to completely arbitrary action. In my case of OpenBox window manager I used something like this:
$ cat <whatever>/rc.xml
...
<keybind key="Katakana">
<action name="Execute">
<command>volume_up.sh</command>
</action>
</keybind>
<keybind key="Hiragana_Katakana">
<action name="Execute">
<command>volume_down.sh</command>
</action>
</keybind>
...
keymap
utility do anyway?