From: M.S. <ma...@su...> - 2007-10-23 13:09:16
|
On Tue, 2007-10-23 at 12:23 +0200, Michel Dänzer wrote: > On Mon, 2007-10-22 at 23:09 +0200, M.S. wrote: > > I attached a patch (vs. 2.6.22.9) which enables the hid stuff to > > recognize the new aluminum wired Apple keyboard's FN key features. > > http://www.apple.com/keyboard/ > > Great keyboard, isn't it? :) > Surprisingly, yes (of course after switching left alt and cmd keys). ;) > The HID tree at > git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git already > carries patches of mine for this. I CC'd this list when submitting those > but I think they didn't make it here due to some mail setup issues. > Awesome, could not find anything related to the keyboard so I just went ahead buzzing my own patch. However, I still can't find your patch in the tree. Would you mind sending me a link so I can compare them? This list seems to filter your mails in some way. > Maybe you want to look at those patches and submit any necessary > followup changes to the HID/input maintainers. > > Codewise it seems to get a bit messy with all that > > GEYSER/Powerbook/QUIRKS stuff but I don't know how to make it cleaner at > > the moment. Comments welcome. > > I re-use the existing quirks and use the device ID to choose the > translation table. > I did it that way first until I saw that only quirks can be used in hid-input.c and the product mapping happens in hid-quirks.c (rather than hardcoding in former). > > > +static struct hidinput_key_translation apple_keyboard[] = { > > + { KEY_VOLUMEUP, KEY_EJECTCD }, > > + { } > > +}; > > What's this for? Doesn't seem necessary here. > My product is 05ac:0221. The keyboards appears to emit the volumeup key according USB HID when pressing the eject key. Despite the higher stack will still work (as you will map whatever with it), I thought this might need to be corrected so any higher "I map this nice HID key to some string defaults" get correct keys upfront. > > > - if (test_bit(usage->code, hid->pb_pressed_numlock) || > > - test_bit(LED_NUML, input->led)) { > > + if (!(hid->quirks & HID_QUIRK_APPLE_KEYBOARD) && > > (test_bit(usage->code, hid->pb_pressed_numlock) || > > + test_bit(LED_NUML, input->led))) { > > trans = > > find_translation(powerbook_numlock_keys, usage->code); > > I don't understand what this is for either, can you elaborate? > > I had issues with the keyboard getting stuck (only FN+FX keys worked) if this was not "disabled" for this product, however I might just have had messed something else up while testing. --- M.S. |