lkml.org 
[lkml]   [2006]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC?] usb/input: Add support for fn key on Apple PowerBooks
On Fri, Jan 13, 2006 at 07:53:02AM +0100, Michael Hanselmann wrote:

> It indeed is. Fixed.

It gets better all the time. ;)

> New patch:
>
> This patch implements support for the fn key on Apple PowerBooks using
> USB based keyboards.
>
> Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
> Acked-by: Rene Nussbaumer <linux-kernel@killerfox.forkbomb.ch>
> Acked-by: Johannes Berg <johannes@sipsolutions.net>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> ---

> @@ -325,7 +459,27 @@ static void hidinput_configure_usage(str
>
> set_bit(EV_REP, input->evbit);
> switch(usage->hid & HID_USAGE) {
> - case 0x003: map_key_clear(KEY_FN); break;
> +#ifdef CONFIG_USB_HIDINPUT_POWERBOOK
> + /* The fn key on Apple PowerBooks */
> + case 0x0003: {
> + struct hidinput_key_translation *trans;
> +
> + map_key_clear(KEY_FN);
> +
> + set_bit(KEY_FN, input->keybit);

The set_bit(KEY_FN, input->keybit) is superfluous here, right?
map_key_clear(KEY_FN); will take care of that further down.

> + set_bit(KEY_NUMLOCK, input->keybit);
> +
> + /* Enable all needed keys */
> + for(trans = powerbook_fn_keys; trans->from; trans++)
> + set_bit(trans->to, input->keybit);
> +
> + for(trans = powerbook_numlock_keys; trans->from; trans++)
> + set_bit(trans->to, input->keybit);
> +
> + goto ignore;
> + }
> +#endif
> +
> default: goto ignore;
> }
> break;

--
Vojtech Pavlik
SuSE Labs, SuSE CR
-
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: 2006-01-13 08:49    [W:0.120 / U:0.956 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site