You are not logged in.

#1 2014-03-17 09:20:55

strexfive
Member
Registered: 2014-03-17
Posts: 5

[SOLVED] Extra Keyboard Keys: Keypresses Not Captured By Xorg

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)

Offline

#2 2014-03-17 10:02:16

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 452

Re: [SOLVED] Extra Keyboard Keys: Keypresses Not Captured By Xorg

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.

Offline

#3 2014-03-18 00:27:26

strexfive
Member
Registered: 2014-03-17
Posts: 5

Re: [SOLVED] Extra Keyboard Keys: Keypresses Not Captured By Xorg

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."

Offline

#4 2014-03-18 00:43:00

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,004

Re: [SOLVED] Extra Keyboard Keys: Keypresses Not Captured By Xorg

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.

Online

#5 2014-03-18 07:43:23

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 452

Re: [SOLVED] Extra Keyboard Keys: Keypresses Not Captured By Xorg

@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).

Offline

#6 2014-03-19 00:49:19

strexfive
Member
Registered: 2014-03-17
Posts: 5

Re: [SOLVED] Extra Keyboard Keys: Keypresses Not Captured By Xorg

Okay, I'll use the talk page next time.  Will add to the wiki according to all the feedback.

Offline

Board footer

Powered by FluxBB