X11 doesn’t see keycodes above 255, so how to remap those few keys into the gaps below 255?
/usr/lib/keymap
existed in raring, which worked like this:
1. Keys identification:
sudo /lib/udev/keymap input/event3
> scan code: 0xC1021 key code: zoomreset => 100%
> scan code: 0xC101F key code: zoomin => zoom -
> scan code: 0xC1020 key code: zoomout => zoom +
> scan code: 0xC0192 key code: calc => calculator
2. Remap keys:
sudo /lib/udev/keymap input/event3 0xC1021 phone
sudo /lib/udev/keymap input/event3 0xC101F sport
sudo /lib/udev/keymap input/event3 0xC1020 shop
sudo /lib/udev/keymap input/event3 0xC0192 www
It was great, simple and quick...
xmodmap works for keys < 255 like my calculator key (code 148)
sudo evtest /dev/input/event3
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x46d product 0xc517 version 0x110
Input device name: "Logitech USB Receiver"
...
Testing ... (interrupt to exit)
> Event: time 1381940761.592647, type 1 (EV_KEY), code 140 (KEY_CALC), value 1 => calculator
> Event: time 1381940790.224658, type 1 (EV_KEY), code 420 (KEY_ZOOMRESET), value 1 => 100%
> Event: time 1381940810.928667, type 1 (EV_KEY), code 419 (KEY_ZOOMOUT), value 1 => Zoom -
> Event: time 1381940836.216678, type 1 (EV_KEY), code 418 (KEY_ZOOMIN), value 1 => Zoom +
**EDIT : I have found the solution in this ubuntuforum post.
xmodmap
comes to late in the food chain, as X11 doesn’t see keycodes above 255. – Btw, I don’t usexmodmap
as it knows nothing about XKB. I fiddle with the xkb config files and runsetxkbmap ...
for X related keyboard configuration (which this problem is not really).