Map extra keys on compaq evo
From: Pavel Machek (pavel_at_suse.cz)
Date: 10/31/04
- Previous message: Sam Ravnborg: "Re: [PATCH/take 2] ppc: fix build with O=$(output_dir)"
- Next in thread: Brice Goglin: "Re: Map extra keys on compaq evo"
- Reply: Brice Goglin: "Re: Map extra keys on compaq evo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 31 Oct 2004 22:38:59 +0100 To: vojtech@suse.cz, kernel list <linux-kernel@vger.kernel.org>
Hi!
Compaq Evo notebooks seem to use non-standard keycodes for their extra
keys. I workaround that quirk with dmi hook.
I think that number of such workarounds neccessary should be
reasonably small (like one for each manufacturer), and therefore this
would be good thing...
Pavel
--- clean/drivers/input/keyboard/atkbd.c 2004-10-01 00:30:13.000000000 +0200
+++ linux/drivers/input/keyboard/atkbd.c 2004-10-31 22:35:52.000000000 +0100
@@ -26,6 +26,7 @@
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/workqueue.h>
+#include <linux/dmi.h>
#define DRIVER_DESC "AT and PS/2 keyboard driver"
@@ -986,8 +987,31 @@
.cleanup = atkbd_cleanup,
};
+static int __init add_evo_keys(struct dmi_system_id *d)
+{
+ printk("Compaq Evo detected, mapping extra keys\n");
+ atkbd_set2_keycode[0x80 | atkbd_unxlate_table[0x23] ] = 150;
+ atkbd_set2_keycode[0x80 | atkbd_unxlate_table[0x1e] ] = 155;
+ atkbd_set2_keycode[0x80 | atkbd_unxlate_table[0x1a] ] = 217;
+ atkbd_set2_keycode[0x80 | atkbd_unxlate_table[0x1f] ] = 157;
+ return 0;
+}
+
+static struct dmi_system_id __initdata keyboard_dmi_table[] = {
+ { /* Handle special keys on Compaq Evo */
+ .callback = add_evo_keys,
+ .ident = "Compaq Evo",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Evo N620c"),
+ },
+ }
+};
+
+
int __init atkbd_init(void)
{
+ dmi_check_system(keyboard_dmi_table);
serio_register_driver(&atkbd_drv);
return 0;
}
-- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! - 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/
- Previous message: Sam Ravnborg: "Re: [PATCH/take 2] ppc: fix build with O=$(output_dir)"
- Next in thread: Brice Goglin: "Re: Map extra keys on compaq evo"
- Reply: Brice Goglin: "Re: Map extra keys on compaq evo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Map extra keys on compaq evo
... >> keys. ... I workaround that quirk with dmi hook. ...
I have to configure these extra keys with "hotkeys" ... send the line "unsubscribe linux-kernel"
in ... (Linux-Kernel) - Re: 2.6.12 USB Keypad still not working
... >>showkey when keys are pressed. ... Hamradio License G3VBV,
Keen licensed Private Pilot ... send the line "unsubscribe linux-kernel" in ...
(Linux-Kernel) - [RFC][PATCH] USB HID buttons quirk for Chic Technology Corp. Browser Mice
... USB HID buttons quirk for Chic Technology Corp. Browser Mice. ... For a mapping
to be used and the appropriate key-down event to be generated, ... extern int hidinput_connect;
... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: Fw: ati-remote strangeness from 2.6.12 onwards
... > excessfully repeat keys/accelerate when pressing a button, ... >
Press combination of keys or/and click under the window. ... send the line "unsubscribe
linux-kernel" in ... (Linux-Kernel) - Re: Commit "[PATCH] USB: Always do usb-handoff" breaks my powerbook
... > My G4 powerbook gets a machine check on boot as a result of commit ...
quirk anyway. ... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel)