[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101026120619.GB27720@deckard.alcopop.org>
Date: Tue, 26 Oct 2010 13:06:19 +0100
From: Jon Dowland <jmtd@...ian.org>
To: Azael Avalos <coproscefalo@...il.com>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Matthew Garrett <mjg@...hat.com>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress
On Mon, Oct 25, 2010 at 12:42:41PM -0600, Azael Avalos wrote:
> It actually generates on key press/release with different key codes,
> 0x17f and 0x100 respectively. So I think that both should be added.
Presently the driver ignores key release events and only deals with key
presses. It also filters out a 0x100 value specifically in the event
handler. Do you mean something like this (untested)?
--- toshiba_acpi.c~ 2010-10-26 12:56:46.000000000 +0100
+++ toshiba_acpi.c 2010-10-26 13:04:42.000000000 +0100
@@ -123,6 +123,7 @@
MODULE_DEVICE_TABLE(acpi, toshiba_device_ids);
static const struct key_entry toshiba_acpi_keymap[] __initconst = {
+ { KE_KEY, 0x100, { KEY_FN } }, /* up */
{ KE_KEY, 0x101, { KEY_MUTE } },
{ KE_KEY, 0x102, { KEY_ZOOMOUT } },
{ KE_KEY, 0x103, { KEY_ZOOMIN } },
@@ -135,6 +136,7 @@
{ KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
{ KE_KEY, 0x142, { KEY_WLAN } },
{ KE_KEY, 0x143, { KEY_PROG1 } },
+ { KE_KEY, 0x17f, { KEY_FN } }, /* down */
{ KE_KEY, 0xb05, { KEY_PROG2 } },
{ KE_KEY, 0xb06, { KEY_WWW } },
{ KE_KEY, 0xb07, { KEY_MAIL } },
@@ -854,8 +856,6 @@
do {
hci_read1(HCI_SYSTEM_EVENT, &value, &hci_result);
if (hci_result == HCI_SUCCESS) {
- if (value == 0x100)
- continue;
/* act on key press; ignore key release */
if (value & 0x80)
continue;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists