From 5fa1d7942149d73f5dee8940834d6df8c7977266 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 8 Oct 2009 21:43:38 +0200 Subject: keymap: Add Logitech Wave USB This introduces a new rules section for USB keyboards, too. https://launchpad.net/bugs/215035 --- Makefile.am | 1 + extras/keymap/95-keymap.rules | 20 ++++++++++++++++++-- extras/keymap/keymaps/logitech-wave | 16 ++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 extras/keymap/keymaps/logitech-wave diff --git a/Makefile.am b/Makefile.am index af321d8bdb..3610998e8e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -510,6 +510,7 @@ dist_udevkeymap_DATA = \ extras/keymap/keymaps/lenovo-3000 \ extras/keymap/keymaps/lenovo-thinkpad_x6_tablet \ extras/keymap/keymaps/lenovo-thinkpad_x200_tablet \ + extras/keymap/keymaps/logitech-wave \ extras/keymap/keymaps/maxdata-pro_7000 \ extras/keymap/keymaps/medion-fid2060 \ extras/keymap/keymaps/medionnb-a555 \ diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules index c63ae4a857..967bb4bed1 100644 --- a/extras/keymap/95-keymap.rules +++ b/extras/keymap/95-keymap.rules @@ -9,14 +9,30 @@ ACTION!="add", GOTO="keyboard_end" SUBSYSTEM!="input", GOTO="keyboard_end" KERNEL!="event*", GOTO="keyboard_end" -ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" -ENV{DMI_VENDOR}=="", GOTO="keyboard_end" +SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p", GOTO="keyboard_usbcheck" +GOTO="keyboard_modulecheck" + +# +# The following are external USB keyboards +# + +LABEL="keyboard_usbcheck" + +ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Multimedia Keyboard", RUN+="keymap $name logitech-wave" + + +GOTO="keyboard_end" # # The following are exposed as separate input devices with low key codes, thus # we need to check their input device product name # +LABEL="keyboard_modulecheck" + +ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" +ENV{DMI_VENDOR}=="", GOTO="keyboard_end" + ENV{DMI_VENDOR}=="IBM*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-ibm" ENV{DMI_VENDOR}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-lenovo" ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", ATTR{[dmi/id]product_name}=="W3J", RUN+="keymap $name module-asus-w3j" diff --git a/extras/keymap/keymaps/logitech-wave b/extras/keymap/keymaps/logitech-wave new file mode 100644 index 0000000000..caa5d5d310 --- /dev/null +++ b/extras/keymap/keymaps/logitech-wave @@ -0,0 +1,16 @@ +0x9001C scale #expo +0x9001F zoomout #zoom out +0x90020 zoomin #zoom in +0x9003D prog1 #gadget +0x90005 camera #camera +0x90018 media #media center +0x90041 wordprocessor #fn+f1 (word) +0x90042 spreadsheet #fn+f2 (excel) +0x90043 calendar #fn+f3 (calendar) +0x90044 prog2 #fn+f4 (program a) +0x90045 prog3 #fn+f5 (program b) +0x90046 prog4 #fn+f6 (program c) +0x90048 messenger #fn+f8 (msn messenger) +0x9002D find #fn+f10 (search www) +0x9004B search #fn+f11 (search pc) +0x9004C ejectclosecd #fn+f12 (eject) -- cgit v1.2.3-54-g00ecf