When we press our hotkey, two scenarios are possible:
nothing is displayed: the key is not seen in any way by our os, we whould give up;
a decimal code is displayed; the hotkey has a scancode; the next section will help you to associate this scancode with a keycode.
My keyboard generates no output with "showkey -s", but the keys have a code. I can see the code in an X session in the messages.log. --Doc Angelo 15:39, 30 November 2007 (EST)
- What is the exact output you receive? If you can see the code in X, then you can bind it to a function, such as volume control, hibernate, etc. --Thayer
- This would be really surprising. In particular if it happens only in X! Nothing happens in the logs if you type it in the console? Remember that showkey should be used from the console. --Patroclo7
- I have a "Cherry Cymotion Master XPress" (almost the same as the Cherry Linux-Keyboard, but with a tiny "Window" on one of the keys). I am using showkey (and showkey -s) outside of an X-Session. 10 keys on the side dont generate any code, the other keys (like play/stop/www/calculator) generate a code. But usable is every key, even those keys on the side, which are supposed to be "unusable" according to the wiki. Within KDE i hit those keys and look at the /var/log/messages which tells me something like seen below (this is copied from a gentoo wiki). After adding the setkeycodes-commands to /etc/rc.local i can use them in X (and bind them via Xmodmap and so on). Maybe i should rewrite the wiki? (Warning, im an Archnewbie ;) )
atkbd.c: Unknown key pressed (translated set 2, code 0xaa on isa0060/serio0). atkbd.c: Use 'setkeycodes e02a <keycode>' to make it known.
- Well, I would describe it as a bug in showkey -s, because the purpose of the command is just to give the scancode of a key, but it seems that your keys have a scancode but showkey -s does not catch it. May be that the wiki should be integrated saying to check also the system logs. When I wrote this guide, I was aware that the scancodes were displayed in the system logs, but I simply found that the showkey method was easier.
- Anyway, there is still a thing I do not understand: does the message in the log appear only when you press the keys in X or also when you press them from the console (in a shell, without showkey)? --User:Patroclo7:Patroclo7
- Sorry for the late answer. I was busy. The messages in the log appear in console and in an X-Session. If i find time in the holydays, i'll see, how this wikientry could be extended with this information. --Doc Angelo 13:04, 14 December 2007 (EST)