Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can I make my kernel support more keycodes?
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
rlholgate
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jan 2005
Posts: 82
Location: UK

PostPosted: Fri Jul 01, 2005 1:19 pm    Post subject: Can I make my kernel support more keycodes? Reply with quote

I have a remote control that uses the ir-kbd-gpio module. That module makes the remote look like a keyboard. The module is working properly - when I press buttons on the remote I can use showkey to display the keycodes the module generates, e.g:
Code:
linux ~ # sleep 1; showkey
kb mode was RAW
press any key (program terminates 10s after last keypress)...
keycode 372 press   <-- this is the "full screen" button on the remote
keycode 372 release

That's good. Now heres the problem: If I try to actually map that keycode to something I get an error:
Code:
linux ~ # loadkeys - << EOD
> plain keycode 372 = w
> EOD
Loading <stdin>
loadkeys: <stdin>:4: addkey called with bad index 372

Seems my kernel can only map keycodes less than 255. How do I configure it for a keymap up to 512?


Last edited by rlholgate on Tue Jul 05, 2005 12:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
beissemj
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jan 2005
Posts: 100
Location: Orlando, FL

PostPosted: Tue Jul 05, 2005 7:02 am    Post subject: Reply with quote

emerge xbindkeys
_________________
Debian on a Dell latitude D600: http://d600.elwiki.com/
There is no such thing as a stupid question. They are just the easiest to answer.
Back to top
View user's profile Send private message
rlholgate
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jan 2005
Posts: 82
Location: UK

PostPosted: Tue Jul 05, 2005 12:31 pm    Post subject: Reply with quote

I have looked at tools like xbindkeys, and might have to use something like that it seems.

This post on the LKML - http://lkml.org/lkml/2003/12/30/49 shows dumpkeys output for keys from 0 to 511, which seems to imply its possible to compile the kernel with a keymap size of 512, instead of the normal 256. Certainly when I run dumpkeys on my own box it only dumps keys up to and including 255, and tells me the keyrange supported by the kernel is 0 to 255. This tallies up with the kernel source, which defines NR_KEYS as 255 in /usr/src/linux/include/linux/keyboard.h.

Maybe I don't know what I'm talking about, cause I'm certainly not finding much info on the topic! - but that LKML posting got me wondering if NR_KEYS can be configured somehow, so the kernel can directly map keys like 372?
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