linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Remap MSI Laptop touchpad on/off key to F22 and F23
@ 2011-03-10  2:17 Lee, Chun-Yi
  2011-03-10  7:59 ` Martin Pitt
  0 siblings, 1 reply; 2+ messages in thread
From: Lee, Chun-Yi @ 2011-03-10  2:17 UTC (permalink / raw)
  To: linux-hotplug

MSI Laptop driver will query the real touchpad state then emit
KEY_TOUCHPAD_ON/OFF key.

Currently, X has defined F22 for touchpad on and F23 for touchpad
off. This patch aligns MSI Laptop driver's key with F22 and F23.

This patch also merge ID_INPUT_KEY=1 key to msi-laptop input device
for workaround the input_id doesn't support keycode large then 256.

Tested on MSI U160 netbook using msi-laptop driver.

Cc: Martin Pitt <martin.pitt@ubuntu.com>
Cc: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
---
 extras/keymap/95-keymap.rules |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules
index 7f849d3..00462f7 100644
--- a/extras/keymap/95-keymap.rules
+++ b/extras/keymap/95-keymap.rules
@@ -47,6 +47,7 @@ ENV{DMI_VENDOR}="Sony*", KERNELS="input*", ATTRS{name}="Sony Vaio Keys", RUN+
 ENV{DMI_VENDOR}="ASUS*", KERNELS="input*", ATTRS{name}="Eee PC WMI hotkeys", RUN+="keymap $name 0x6B f21"
 ENV{DMI_VENDOR}="ASUS*", KERNELS="input*", ATTRS{name}="Eee PC Hotkey Driver", RUN+="keymap $name 0x37 f21"
 ENV{DMI_VENDOR}="Acer*", KERNELS="input*", ATTRS{name}="Acer WMI hotkeys", RUN+="keymap $name 0x82 f21"
+ENV{DMI_VENDOR}="MICRO-STAR*|Micro-Star*", KERNELS="input*", ATTRS{name}="MSI Laptop hotkeys", ENV{ID_INPUT_KEY}="1", RUN+="keymap $name 0x213 f22 0x214 f23"
 
 # Older Vaios have some different keys
 ENV{DMI_VENDOR}="Sony*", ATTR{[dmi/id]product_name}="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*", ATTRS{name}="Sony Vaio Keys", RUN+="keymap $name module-sony-old"
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remap MSI Laptop touchpad on/off key to F22 and F23
  2011-03-10  2:17 [PATCH] Remap MSI Laptop touchpad on/off key to F22 and F23 Lee, Chun-Yi
@ 2011-03-10  7:59 ` Martin Pitt
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Pitt @ 2011-03-10  7:59 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]

Hello Lee,

Lee, Chun-Yi [2011-03-10 10:17 +0800]:
> MSI Laptop driver will query the real touchpad state then emit
> KEY_TOUCHPAD_ON/OFF key.
> 
> Currently, X has defined F22 for touchpad on and F23 for touchpad
> off. This patch aligns MSI Laptop driver's key with F22 and F23.

Thanks! I pushed this part to trunk.

> This patch also merge ID_INPUT_KEY=1 key to msi-laptop input device
> for workaround the input_id doesn't support keycode large then 256.

I skipped this part, though, as I'd much rather fix the actual bug in
id_input. I don't see anything off-hand there which would limit the
key bitmask scanning (the capabilities/key attribute) to 255. It
reserves a bitmask array of KEY_MAX bits, which
/usr/include/linux/input.h defines as 0x2ff, so the keys you define
(0x213 and 0x214) should be well within that range.

Can you please give me the capabilities/ev and capabilities/key
contents of that input device, and also the "udevadm info --export-db"
parts of that keyboard module (both /event and /input), or just attach
the full output when in doubt? With that information I should be able
to reproduce the problem locally.

Thank you,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-10  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-10  2:17 [PATCH] Remap MSI Laptop touchpad on/off key to F22 and F23 Lee, Chun-Yi
2011-03-10  7:59 ` Martin Pitt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).