Re: Busted keyboard, fix, and Question about default HID device plumbing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks!

Working on it now...

-- Terry

On Fri, Oct 7, 2011 at 11:19 PM, Jiri Kosina <jkosina@xxxxxxx> wrote:
> On Fri, 7 Oct 2011, Terry Lambert wrote:
>
>> You make a very good point on the key remapping.
>>
>> ...
>>
>> Are we sure that there isn't a field in the keyboard information in
>> the USB that reports the keyboard does this?
>>
>> The only other alternative seems to be to quirk the keyboard as
>> reporting keys down when they are down, up when they are up, and
>> generating pseudo events for "keycode not present in report".
>>
>> I guess I'm willing to write a "hosed keyboard driver" driver if
>> necessary.  This apparently effects about 5-10% of keyboards,
>> predominantly laptops with internal USB (some dell inspiron, some
>> samsung), and the folding keyboards people like to use with android
>> tablets.
>>
>> I'm willing to take any advice about where I can get a handle on all
>> the keys in a given report to implement a general quirk on this
>> hardware.
>>
>> If necessary, we can always write a driver, I suppose, if you can
>> point me at an example?
>
> So if I understood the situation correctly (Dmitry, thanks for adding me
> to CC), what you want to do is to write a very simple driver that has a
> hook called every time HID event occurs on the keyboard, and have it do
> modifier magic before it's reported to the input subsystem.
>
> There are various existing drivers which are doing exactly this that can
> serve as an example. The simplest one probably is hid-microsoft, the more
> sophisticated one is hid-apple. These two are registering ->event
> callback, so they are obtaining already pre-parsed information.
>
> If you'd need to receive information that hasn't been parsed yet by the
> HID parser, you'd rather register ->raw_event callback. There are various
> drivers that to this as well -- hid-zydacron being a really simple one and
> hid-magicmouse being a sophisticated one.
>
> I believe those drivers should serve as a perfect example for what you
> need.
>
> --
> Jiri Kosina
> SUSE Labs
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux