In Extra Keyboard Keys: In Xorg it states "If you press a key and nothing appears in the terminal, it means that either the key does not have a scancode, or the scancode is not mapped to a keycode." If I understand things correctly, this isn't necessarily true, right?
In certain DEs, like mine (xfce), the DE hijacks/grabs certain keypresses (e.g. function keys) so that nothing is caught with xev at the terminal. Therefore the reason that I press a key and nothing happens isn't necessarily that the scancode is not mapped to a keycode. If I startup a plain Xorg session with xinit, using the same xev command with xterm will catch the keycode and keysym.
Extra Keyboard Keys In Xorg: Desktop Environments talks about DEs having special settings editors to configure extra keyboard keys, but unless I missed something, doesn't make light of the fact that DEs can actually grab/hijack keypresses from xorg.
Perhaps the wiki could be modified to say something like:
"If you press a key and nothing appears in the terminal, it means that either the key does not have a scancode, the scancode is not mapped to a keycode, or the DE is executing a process that is capturing the specific scancode before xorg has the chance to recognize it. If you suspect your DE is capturing the scancode, try running try starting xterm from the console with "xinit /usr/bin/xterm -- :1" and then press the key again."
I am a rank newbie with one month of Arch experience, so you devs feel free to tell me where I messed up here, or in the off-chance I hit upon a worthy addition, let me know and I will figure out how to properly add to the wiki. Thanks for your time.
Last edited by strexfive (2014-03-19 00:46:27)
Technically you are right, but there are more things that could "hijack" the keypress -- for example systemd-logind reacts to power/sleep button being pressed (unless you have modified /etc/systemd/logind.conf). You would have to adjust (generalize) your wording.
P.S.: Next time please provide link(s) to the relevant section(s) in the wiki, it will save some time for everybody.
I see your point. Is this general enough, and is the xterm tip still worth adding?
"If you press a key and nothing appears in the terminal, it means that either the key does not have a scancode, the scancode is not mapped to a keycode, or some other process is capturing the keypress. If you suspect that a process owned by your specific DE is capturing the keypress, you can try starting xterm from the console with "xinit /usr/bin/xterm -- :1" and then run xev and press the key again."
Wouldn't be Forum & Wiki, maybe Apps & DEs.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
@nomorewindows: The talk page on the wiki is probably the most appropriate place for such discussion.
@strexfive: Please don't use the phrase "owned by your specific DE", not everybody is using a desktop environment, plus processes are not "owned". You could write "If you suspect that a process listening to X server is capturing the keypress, you can try running xev from a clean X session: <command example>".
Anyway, just make the change, we can adjust it later (the wiki page is in my watchlist).
Okay, I'll use the talk page next time. Will add to the wiki according to all the feedback.