Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
keycode above 255
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mb1248
n00b
n00b


Joined: 10 Jun 2007
Posts: 7

PostPosted: Sun Jun 10, 2007 11:36 am    Post subject: keycode above 255 Reply with quote

Hi,

I use a Win-TV nova-s remote control as pseudo keyboard on /dev/input/event4.

Some keys don't recognize in xev. showkey -k tells that these keys have a keycode above 255.

I want to remap the scancodes to unused keycodes less than 255.
But showkey -s hasn't an output for these keys.

Is there another tool to recognize scancodes?

/BR
Back to top
View user's profile Send private message
tobr
Guru
Guru


Joined: 29 May 2006
Posts: 330

PostPosted: Tue Jun 12, 2007 2:48 pm    Post subject: Re: keycode above 255 Reply with quote

mb1248 wrote:
Hi,

I use a Win-TV nova-s remote control as pseudo keyboard on /dev/input/event4.

Some keys don't recognize in xev. showkey -k tells that these keys have a keycode above 255.

I want to remap the scancodes to unused keycodes less than 255.
But showkey -s hasn't an output for these keys.

Is there another tool to recognize scancodes?

/BR


I noticed a strange thing while trying something with both an USB keyboard and a PS/2 keyboard: showkey -s doesn't show the real scancode! I have remapped my PS/2 keyboard (I now have two down-arrow-keys) and those two keys show the same scancode (which is impossible, because it were different keys before). So I guess there's a bug in showkey -s. You can still see the mapping with getkeycodes when logged into the console. If you know the keycode you can find out the scancode. If there are keys with no corresponding keycode you can press the key and search for a message in /var/log/messages telling you it currently has no keycode and how to assign it one.

EDIT: What I said above works for PS/2 devices, I can not guarantee that it will work with USB devices. For me setkeycodes failed for my USB keyboard attached through an PS/2-to-USB adapter. YMMV
_________________
Please add [SOLVED] to your message title if your problem is solved.

Death to all blobs!
Back to top
View user's profile Send private message
mb1248
n00b
n00b


Joined: 10 Jun 2007
Posts: 7

PostPosted: Wed Jun 13, 2007 2:31 pm    Post subject: Re: keycode above 255 Reply with quote

USB and PS/2 have different scancodes, see http://www.win.tue.nl/~aeb/linux/kbd/scancodes-10.html

I have the keycodes, but no scancodes. getkeycodes doesn't list the keys above 255. Neither showkey -s lists the keycodes nor /var/log/messages logged them.

I have used /var/log/messages and setkeycodes to set some keys of my keyboard.

I think X doesn't recognize keys above 255 and showkey -s doesn't it too. Is there another program which show the scancode? Maybe something like cat /dev/input/event4 | hexdump
Back to top
View user's profile Send private message
153373
n00b
n00b


Joined: 03 Dec 2006
Posts: 8

PostPosted: Sun Oct 07, 2007 5:15 pm    Post subject: Reply with quote

Hi folks,
I have the same problem with my usb mouse Mx610 (Logitech). It has two buttons that are handled as keys (for mail client and instant messenger). One is working well (keycode <= 255), the other doesn't (keycode > 255).
I already found out that the keys are mapped in the kernel module usb-hid. The important source file is drivers/hid/hid-input.c.
At my current kernel version (2.6.22-r8 of gentoo-sources) the line 588 is the important one
case 0x1bc: map_key_clear(KEY_MESSENGER); break;
I don't really know, which kind of code the 0x1bc is, but KEY_MESSENGER = 430 is the key code to which the button is mapped. I can get to work the key by replacing KEY_MESSENGER by some code <= 255, but it should work this way, too.
As already reported by others, showkey -k displays the keycode 430, while showkey -s doesn't display anything for that button.
Nor does xev or any other program I tried (e.g. xfce keyboard settings) recognize the key (i.e. react in any way).
I tried xmodmap -e "keycode 430 = XF86Messenger", but it doesn't change anything (at least it displays no error).

Some additional info: Since the change of KEY_MAX to 0x1ff was quite recent, maybe some programs didn't integrate the fix yet. I use

gentoo-sources 2.6.22-r8
kbd 1.13-r1
xmodmap 1.0.3
xf86-input-evdev 1.1.5-r1
xkeyboard-config 0.9

Are there other packages, that could be outdated?
Greetings, Stephan
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum