You are not logged in.
Quite simply put, X (and thus xev) refuse to recognize my logitech "itouch" keys (at least I think that's what they're called). They are essentially secondary F-Keys, and if I turn off "F-Lock" their secondary functions are then enabled.
Unfortunately X doesn't see them at all. I think the issue may be that they don't have scancodes but only keycodes, and (from my googling) it would appear as though X wants scancodes and not keycodes ... And these keys have keycodes, and not scancodes (as demonstrated to me by showkey and showkey -s). It might also be of interest to note that these keycodes are from 336 to 347. Now, this shouldn't be a problem. I should just be able to
setkeycodes someunusedscancode keycode
and everything should be alright. The issue, however, is that setkeycodes yells at me with
KDSETKEYCODE: Invalid argument
failed to set scancode [somescancode] to keycode 336
I'm using the logitech Y-RH35 which is a wireless USB keyboard (Picture is Here). I, am also using HAL.
How would I go about getting X to recognize these keys (which I assume would mean mapping a scancode to them)?
Last edited by Amagineer (2011-08-27 01:19:26)
Offline
Amagineer,
I think for X you should use 'xev', not 'showkey'. Execute 'xev' on a terminal session, position the mouse in the little box that
opens and then press the keys on the keyboard.
Also afterwards take a look at var/log/messages.
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
xev does NOT see when I press the keys, however showkey does. This makes it seem to me that the kernel can detect the keys fine, but that X can't handle them. As I mentioned in my first post, it seems like X wants scancodes, but for some reason these keys have keycodes, but not scancodes.
var/log/messages.log does not seem contain anything pertaining to my keyboard. Here's a grep for key just in case I missed something.
sudo cat /var/log/messages.log | grep -i key
Feb 15 02:07:39 HOSTNAME kernel: generic-usb 0003:046D:C505.0002: input,hidraw1: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:13.0-2/input0
Feb 15 20:46:17 HOSTNAME kernel: generic-usb 0003:046D:C505.0002: input,hidraw1: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:13.0-2/input0
Offline
If you have keycodes, you can assign scancodes in $HOME/.xmodmap, and execute 'xmodmap ~/.xmodmap'.
The .xmodmap file will look like:
keycode 87 = XF86Save
keycode 88 = XF86MailForward
keycode 89 = XF86Messenger
keycode 83 = XF86Forward
keycode 84 = XF86WWW
keycode 85 = XF86Shop
!keycode 79 = XF86WebCam
keycode 80 = XF86AudioLowerVolume
keycode 81 = XF86AudioRaiseVolume
The keycodes will be yours, the symbolic names are in '/usr/share/X11/XKeysymDB'
The names are uninteresting, you just need to assign them to some action depending on the
Desktop/WM taht you are using.
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
Alright, setting it up in xmodmap and running
xmodmap ~/.xmodmap
did not solve my problem at all. xev still doesn't see the keys, yet the kernel does (or so showkey tells me).
Just in case I simply botched my .xmodmap, here it is
keycode 336 = XF86New
keycode 337 = XF86Reply
keycode 338 = XF86MailForward
keycode 339 = XF86Send
keycode 340 = XF86AudioRewind
keycode 341 = XF86AudioForward
keycode 342 = XF86AudioPlay
keycode 343 = XF86AudioStop
keycode 344 = XF86MyComputer
keycode 345 = XF86Documents
keycode 346 = XF86Pictures
keycode 347 = XF86Music
It might be important to note that xev does NOT see the keys so I used the keycodes that showkey spit out at me (and I'm rather sure that the keycodes returned by showkey are different than those returned by xev)
I think I may have said this before, but I believe that the issue has to do with X not being able to get a scancode from the kernel (the things that showkey -s prints out) since the kernel doesn't have a scancode associated with keycodes 336-347.
Offline
Yep, you must be right. I just took a look at what I did, since it was long ago.
I didn't use showkeys at all, in fact it gives completely different codes.
Using xev by itself, I got something like:
KeyPress event, serial 23, synthetic NO, window 0x2800001,
root 0x58, subw 0x0, time 4054243969, (100,61), root:(650,302),
state 0x0, keycode 145 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 characters: ""
KeyRelease event, serial 23, synthetic NO, window 0x2800001,
root 0x58, subw 0x0, time 4054244070, (100,61), root:(650,302),
state 0x0, keycode 145 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 characters: ""
and what I used was the xev keycode, in this case 145.
Pity but I can't help you.
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline