lkml.org 
[lkml]   [2005]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Possible bug in keyboard.c (2.6.10)


On Wed, 26 Jan 2005, Dmitry Torokhov wrote:

> On Wednesday 26 January 2005 22:16, Sasa Stevanovic wrote:
>> Hi,
>>
>> I had some problems with my laptop's onetouch keys and it eventually led me to
>> keyboard.c file from 2.6.10 kernel (Vojtech Pavlik and others). There may be
>> a bug in the file, please read below.
>>
>> Well, actually, when all omnibook/messages/setkeycodes/hotkeys/xev/showkey etc
>> stuff is stripped off, what remains is that x86_keycodes array has only first
>> 240 members initialized, while remaining 16 are set to 0 due to [256]:
>>
>> static unsigned short x86_keycodes[256] = { <only 240 here> };
>>
>> (For my scenario, workaround was possible.)
>>
>> I am not sure if this is a bug or not; it worked in 2.4.18 without workaround.
>> Might be that someone wanted to prevent reading invalid memory. There are
>> many versions of the file/array definition found on the web, none of which has
>> a comment about this.
>>
>
> From Vojetch Pavilk:
>> I'm sorry, but X only understands the RAW PS/2 protocol, and that one
>> can only transport keycodes up to 240.
>>
>> For keycodes above 240, XFree86 would either need to use the MediumRAW
>> mode, or use event devices for parsing the keyboard.
> http://www.ussg.iu.edu/hypermail/linux/kernel/0406.0/0544.html
>
> You still did not describe what kind of problems you are having with your
> keys.
>
> --
> Dmitry
>

That's ok, I did not post the message to solve my problem, I posted because I
though it was a possible bug. I already worked around the problem by using
setkeycodes to use keycodes (say) 233 and 234 instead of 243 and 244, then I
also changed the upper-layer software to expect 233 and 234 and execute
actions that would normally be executed if 243 or 244 was pressed.

Thank you for the information and the useful link.

P.S. The problem was

atkbd.c: Unknown key pressed (translated set 2, code 0xf4 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e074 <keycode>' to make it known

Then after using setkeycodes e074 244 that's correct code for my computer
(Omnibook XE3 GF), I had

keyboard.c: can't emulate rawmode for keycode 244

Sasa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [from the cache]
©2003-2011 Jasper Spaans