summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am137
-rw-r--r--configure.ac15
-rw-r--r--hwdb/60-keyboard.hwdb2
-rw-r--r--keymaps/acer22
-rw-r--r--keymaps/acer-aspire_57205
-rw-r--r--keymaps/acer-aspire_5920g5
-rw-r--r--keymaps/acer-aspire_69205
-rw-r--r--keymaps/acer-aspire_89305
-rw-r--r--keymaps/acer-travelmate_c3005
-rw-r--r--keymaps/asus3
-rw-r--r--keymaps/compaq-e_evo4
-rw-r--r--keymaps/dell29
-rw-r--r--keymaps/dell-latitude-xt24
-rw-r--r--keymaps/everex-xt50007
-rw-r--r--keymaps/fujitsu-amilo_li_27323
-rw-r--r--keymaps/fujitsu-amilo_pa_25483
-rw-r--r--keymaps/fujitsu-amilo_pro_edition_v35054
-rw-r--r--keymaps/fujitsu-amilo_pro_v32052
-rw-r--r--keymaps/fujitsu-amilo_si_15206
-rw-r--r--keymaps/fujitsu-esprimo_mobile_v54
-rw-r--r--keymaps/fujitsu-esprimo_mobile_v62
-rw-r--r--keymaps/genius-slimstar-32035
-rw-r--r--keymaps/hewlett-packard12
-rw-r--r--keymaps/hewlett-packard-2510p_2530p2
-rw-r--r--keymaps/hewlett-packard-compaq_elitebook2
-rw-r--r--keymaps/hewlett-packard-hdx9494nr3
-rw-r--r--keymaps/hewlett-packard-pavilion3
-rw-r--r--keymaps/hewlett-packard-presario-21003
-rw-r--r--keymaps/hewlett-packard-tablet6
-rw-r--r--keymaps/hewlett-packard-tx23
-rw-r--r--keymaps/hewlett-packard_elitebook-8440p5
-rw-r--r--keymaps/hewlett-packard_elitebook-8460p3
-rw-r--r--keymaps/ibm-thinkpad-usb-keyboard-trackpoint7
-rw-r--r--keymaps/inventec-symphony_6.0_7.02
-rw-r--r--keymaps/lenovo-30005
-rw-r--r--keymaps/lenovo-ideapad8
-rw-r--r--keymaps/lenovo-thinkpad-usb-keyboard-trackpoint13
-rw-r--r--keymaps/lenovo-thinkpad_x200_tablet6
-rw-r--r--keymaps/lenovo-thinkpad_x6_tablet8
-rw-r--r--keymaps/lg-x11012
-rw-r--r--keymaps/logitech-usb6
-rw-r--r--keymaps/logitech-wave16
-rw-r--r--keymaps/logitech-wave-cordless15
-rw-r--r--keymaps/logitech-wave-pro-cordless12
-rw-r--r--keymaps/maxdata-pro_70009
-rw-r--r--keymaps/medion-fid20602
-rw-r--r--keymaps/medionnb-a5554
-rw-r--r--keymaps/micro-star13
-rw-r--r--keymaps/module-ibm16
-rw-r--r--keymaps/module-lenovo17
-rw-r--r--keymaps/module-sony8
-rw-r--r--keymaps/module-sony-old2
-rw-r--r--keymaps/module-sony-vgn8
-rw-r--r--keymaps/module-sony-vpc4
-rw-r--r--keymaps/olpc-xo74
-rw-r--r--keymaps/onkyo14
-rw-r--r--keymaps/oqo-model25
-rw-r--r--keymaps/samsung-other14
-rw-r--r--keymaps/samsung-series-33
-rw-r--r--keymaps/samsung-series-95
-rw-r--r--keymaps/samsung-sq1us7
-rw-r--r--keymaps/samsung-sx20s4
-rw-r--r--keymaps/toshiba-satellite_a1002
-rw-r--r--keymaps/toshiba-satellite_a11010
-rw-r--r--keymaps/toshiba-satellite_m30x6
-rw-r--r--keymaps/zepto-znote11
-rw-r--r--src/udev/keymap/.gitignore5
-rw-r--r--src/udev/keymap/95-keyboard-force-release.rules60
-rw-r--r--src/udev/keymap/95-keymap.rules181
-rw-r--r--src/udev/keymap/README.keymap.txt97
-rwxr-xr-xsrc/udev/keymap/check-keymaps.sh38
-rwxr-xr-xsrc/udev/keymap/findkeyboards68
-rwxr-xr-xsrc/udev/keymap/keyboard-force-release.sh.in22
-rw-r--r--src/udev/keymap/keymap.c453
75 files changed, 3 insertions, 1619 deletions
diff --git a/.gitignore b/.gitignore
index f4f1e45926..bdf9d4afd8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,7 +12,6 @@
/hostnamectl
/install-tree
/journalctl
-/keymap
/libtool
/localectl
/loginctl
diff --git a/Makefile.am b/Makefile.am
index 0be3e79f1c..7e6361c2e8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2154,7 +2154,8 @@ dist_udevhwdb_DATA = \
hwdb/20-usb-classes.hwdb \
hwdb/20-bluetooth-vendor-product.hwdb \
hwdb/20-acpi-vendor.hwdb \
- hwdb/20-OUI.hwdb
+ hwdb/20-OUI.hwdb \
+ hwdb/60-keyboard.hwdb
udevconfdir = $(sysconfdir)/udev
dist_udevconf_DATA = \
@@ -2603,140 +2604,6 @@ EXTRA_DIST += \
src/gudev/seed-example.js
# ------------------------------------------------------------------------------
-if ENABLE_KEYMAP
-keymap_SOURCES = \
- src/udev/keymap/keymap.c
-
-keymap_CPPFLAGS = \
- $(AM_CPPFLAGS) -I src/udev/keymap
-
-keymap_LDADD = \
- libsystemd-shared.la
-
-nodist_keymap_SOURCES = \
- src/udev/keymap/keys-from-name.h \
- src/udev/keymap/keys-to-name.h
-
-BUILT_SOURCES += \
- $(nodist_keymap_SOURCES)
-
-udevlibexec_PROGRAMS += \
- keymap
-
-dist_doc_DATA += \
- src/udev/keymap/README.keymap.txt
-
-dist_udevrules_DATA += \
- src/udev/keymap/95-keymap.rules \
- src/udev/keymap/95-keyboard-force-release.rules
-
-dist_udevhome_SCRIPTS = \
- src/udev/keymap/findkeyboards \
- src/udev/keymap/keyboard-force-release.sh
-
-TESTS += \
- src/udev/keymap/check-keymaps.sh
-
-CLEANFILES += \
- src/udev/keymap/keys.txt \
- src/udev/keymap/keys-from-name.gperf \
- src/udev/keymap/keyboard-force-release.sh
-
-udevkeymapdir = $(udevlibexecdir)/keymaps
-dist_udevkeymap_DATA = \
- keymaps/acer \
- keymaps/acer-aspire_5720 \
- keymaps/acer-aspire_8930 \
- keymaps/acer-aspire_5920g \
- keymaps/acer-aspire_6920 \
- keymaps/acer-travelmate_c300 \
- keymaps/asus \
- keymaps/compaq-e_evo \
- keymaps/dell \
- keymaps/dell-latitude-xt2 \
- keymaps/everex-xt5000 \
- keymaps/fujitsu-amilo_li_2732 \
- keymaps/fujitsu-amilo_pa_2548 \
- keymaps/fujitsu-amilo_pro_edition_v3505 \
- keymaps/fujitsu-amilo_pro_v3205 \
- keymaps/fujitsu-amilo_si_1520 \
- keymaps/fujitsu-esprimo_mobile_v5 \
- keymaps/fujitsu-esprimo_mobile_v6 \
- keymaps/genius-slimstar-320 \
- keymaps/hewlett-packard \
- keymaps/hewlett-packard-2510p_2530p \
- keymaps/hewlett-packard-compaq_elitebook \
- keymaps/hewlett-packard-pavilion \
- keymaps/hewlett-packard-presario-2100 \
- keymaps/hewlett-packard-tablet \
- keymaps/hewlett-packard-tx2 \
- keymaps/hewlett-packard_elitebook-8440p \
- keymaps/hewlett-packard_elitebook-8460p \
- keymaps/hewlett-packard-hdx9494nr \
- keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
- keymaps/inventec-symphony_6.0_7.0 \
- keymaps/lenovo-3000 \
- keymaps/lenovo-ideapad \
- keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
- keymaps/lenovo-thinkpad_x6_tablet \
- keymaps/lenovo-thinkpad_x200_tablet \
- keymaps/lg-x110 \
- keymaps/logitech-usb \
- keymaps/logitech-wave \
- keymaps/logitech-wave-cordless \
- keymaps/logitech-wave-pro-cordless \
- keymaps/maxdata-pro_7000 \
- keymaps/medion-fid2060 \
- keymaps/medionnb-a555 \
- keymaps/micro-star \
- keymaps/module-ibm \
- keymaps/module-lenovo \
- keymaps/module-sony \
- keymaps/module-sony-old \
- keymaps/module-sony-vgn \
- keymaps/module-sony-vpc \
- keymaps/olpc-xo \
- keymaps/onkyo \
- keymaps/oqo-model2 \
- keymaps/samsung-other \
- keymaps/samsung-series-9 \
- keymaps/samsung-series-3 \
- keymaps/samsung-sq1us \
- keymaps/samsung-sx20s \
- keymaps/toshiba-satellite_a100 \
- keymaps/toshiba-satellite_a110 \
- keymaps/toshiba-satellite_m30x \
- keymaps/zepto-znote
-
-udevkeymapforcereldir = $(udevlibexecdir)/keymaps/force-release
-dist_udevkeymapforcerel_DATA = \
- keymaps-force-release/dell-touchpad \
- keymaps-force-release/dell-xps \
- keymaps-force-release/hp-other \
- keymaps-force-release/samsung-other \
- keymaps-force-release/samsung-series-9 \
- keymaps-force-release/samsung-series-3 \
- keymaps-force-release/common-volume-keys
-
-src/udev/keymap/keys.txt: Makefile
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
-
-src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt Makefile
- $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
-
-src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf Makefile
- $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
-
-src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt Makefile
- $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
-endif
-
-EXTRA_DIST += \
- src/udev/keymap/check-keymaps.sh \
- src/udev/keymap/keyboard-force-release.sh.in
-
-# ------------------------------------------------------------------------------
mtd_probe_SOURCES = \
src/udev/mtd_probe/mtd_probe.c \
src/udev/mtd_probe/mtd_probe.h \
diff --git a/configure.ac b/configure.ac
index 94afe51d74..1cffbbb7e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -831,21 +831,6 @@ AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
# ------------------------------------------------------------------------------
-AC_ARG_ENABLE([keymap],
- AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]),
- [], [enable_keymap=yes])
-AS_IF([test "x$enable_keymap" = "xyes"], [
- AC_PATH_PROG([GPERF], [gperf])
- if test -z "$GPERF"; then
- AC_MSG_ERROR([gperf is needed])
- fi
-
- AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
- AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')])
-])
-AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
-
-# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
AS_IF([test "x$enable_manpages" != xno], [
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 1068dedb3b..569b9c74fe 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -448,7 +448,7 @@ keyboard:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnIBM*:pn*:pvr*
KEYBOARD_KEY_17=prog1 # ThinkPad/ThinkVantage button (high keycode: "vendor")
# IBM Thinkpad USB Keyboard Trackpoint
-usb:v04B3p301[89]*
+keyboard:usb:v04B3p301[89]*
KEYBOARD_KEY_900f0=screenlock
KEYBOARD_KEY_900f1=wlan
KEYBOARD_KEY_900f2=switchvideomode
diff --git a/keymaps/acer b/keymaps/acer
deleted file mode 100644
index a0c6fd278a..0000000000
--- a/keymaps/acer
+++ /dev/null
@@ -1,22 +0,0 @@
-0xA5 help # Fn+F1
-0xA6 setup # Fn+F2 Acer eSettings
-0xA7 battery # Fn+F3 Power Management
-0xA9 switchvideomode # Fn+F5
-0xB3 euro
-0xB4 dollar
-0xCE brightnessup # Fn+Right
-0xD4 bluetooth # (toggle) off-to-on
-0xD5 wlan # (toggle) on-to-off
-0xD6 wlan # (toggle) off-to-on
-0xD7 bluetooth # (toggle) on-to-off
-0xD8 bluetooth # (toggle) off-to-on
-0xD9 brightnessup # Fn+Right
-0xEE brightnessup # Fn+Right
-0xEF brightnessdown # Fn+Left
-0xF1 f22 # Fn+F7 Touchpad toggle (off-to-on)
-0xF2 f23 # Fn+F7 Touchpad toggle (on-to-off)
-0xF3 prog2 # "P2" programmable button
-0xF4 prog1 # "P1" programmable button
-0xF5 presentation
-0xF8 fn
-0xF9 f23 # Launch NTI shadow
diff --git a/keymaps/acer-aspire_5720 b/keymaps/acer-aspire_5720
deleted file mode 100644
index b9381f86c6..0000000000
--- a/keymaps/acer-aspire_5720
+++ /dev/null
@@ -1,5 +0,0 @@
-0x84 bluetooth # sent when bluetooth module missing, and key pressed
-0x92 media # Acer arcade
-0xD4 bluetooth # Bluetooth on
-0xD9 bluetooth # Bluetooth off
-0xF4 prog3 # e-key
diff --git a/keymaps/acer-aspire_5920g b/keymaps/acer-aspire_5920g
deleted file mode 100644
index 633c4e854c..0000000000
--- a/keymaps/acer-aspire_5920g
+++ /dev/null
@@ -1,5 +0,0 @@
-0x8A media
-0x92 media
-0xA6 setup
-0xB2 www
-0xD9 bluetooth # (toggle) on-to-off
diff --git a/keymaps/acer-aspire_6920 b/keymaps/acer-aspire_6920
deleted file mode 100644
index 699c954b4e..0000000000
--- a/keymaps/acer-aspire_6920
+++ /dev/null
@@ -1,5 +0,0 @@
-0xD9 bluetooth # (toggle) on-to-off
-0x92 media
-0x9E back
-0x83 rewind
-0x89 fastforward
diff --git a/keymaps/acer-aspire_8930 b/keymaps/acer-aspire_8930
deleted file mode 100644
index 8e36cd947c..0000000000
--- a/keymaps/acer-aspire_8930
+++ /dev/null
@@ -1,5 +0,0 @@
-0xCA prog3 # key 'HOLD' on CineDash Media Console
-0x83 rewind
-0x89 fastforward
-0x92 media # key 'ARCADE' on CineDash Media Console
-0x9E back
diff --git a/keymaps/acer-travelmate_c300 b/keymaps/acer-travelmate_c300
deleted file mode 100644
index bfef4cf868..0000000000
--- a/keymaps/acer-travelmate_c300
+++ /dev/null
@@ -1,5 +0,0 @@
-0x67 f24 # FIXME: rotate screen
-0x68 up
-0x69 down
-0x6B fn
-0x6C screenlock # FIXME: lock tablet device/buttons
diff --git a/keymaps/asus b/keymaps/asus
deleted file mode 100644
index 2a5995f982..0000000000
--- a/keymaps/asus
+++ /dev/null
@@ -1,3 +0,0 @@
-0xED volumeup
-0xEE volumedown
-0xEF mute
diff --git a/keymaps/compaq-e_evo b/keymaps/compaq-e_evo
deleted file mode 100644
index 5fbc573aa4..0000000000
--- a/keymaps/compaq-e_evo
+++ /dev/null
@@ -1,4 +0,0 @@
-0xA3 www # I key
-0x9A search
-0x9E email
-0x9F homepage
diff --git a/keymaps/dell b/keymaps/dell
deleted file mode 100644
index cef41d3e7b..0000000000
--- a/keymaps/dell
+++ /dev/null
@@ -1,29 +0,0 @@
-0x81 playpause # Play/Pause
-0x82 stopcd # Stop
-0x83 previoussong # Previous song
-0x84 nextsong # Next song
-0x85 brightnessdown # Fn+Down Brightness Down
-0x86 brightnessup # Fn+Up Brightness Up
-0x87 battery # Fn+F3 battery icon
-0x88 unknown # Fn+F2 Turn On/Off Wireless - handled in hardware
-0x89 ejectclosecd # Fn+F10 Eject CD
-0x8A suspend # Fn+F1 hibernate
-0x8B switchvideomode # Fn+F8 CRT/LCD (high keycode: "displaytoggle")
-0x8C f23 # Fn+Right Auto Brightness
-0x8F switchvideomode # Fn+F7 aspect ratio
-0x90 previoussong # Front panel previous song
-0x91 prog1 # Wi-Fi Catcher (Dell-specific)
-0x92 media # MediaDirect button (house icon)
-0x93 f23 # FIXME Fn+Left Auto Brightness
-0x95 camera # Shutter button - Takes a picture if optional camera available
-0x97 email # Tablet email button
-0x98 f21 # FIXME: Tablet screen rotation
-0x99 nextsong # Front panel next song
-0x9A setup # Tablet tools button
-0x9B switchvideomode # Display toggle button
-0x9E f21 # Touchpad toggle
-0xA2 playpause # Front panel play/pause
-0xA4 stopcd # Front panel stop
-0xED media # MediaDirect button
-0xD8 screenlock # FIXME: Tablet lock button
-0xD9 f21 # Touchpad toggle
diff --git a/keymaps/dell-latitude-xt2 b/keymaps/dell-latitude-xt2
deleted file mode 100644
index 59ff6ff264..0000000000
--- a/keymaps/dell-latitude-xt2
+++ /dev/null
@@ -1,4 +0,0 @@
-0x9B up # tablet rocker up
-0x9E enter # tablet rocker press
-0x9F back # tablet back
-0xA3 down # tablet rocker down
diff --git a/keymaps/everex-xt5000 b/keymaps/everex-xt5000
deleted file mode 100644
index bd89a23d3e..0000000000
--- a/keymaps/everex-xt5000
+++ /dev/null
@@ -1,7 +0,0 @@
-0x5C media
-0x65 f21 # Fn+F5 Touchpad toggle
-0x67 prog3 # Fan speed control button
-0x6F brightnessup
-0x7F brightnessdown
-0xB2 www
-0xEC mail
diff --git a/keymaps/fujitsu-amilo_li_2732 b/keymaps/fujitsu-amilo_li_2732
deleted file mode 100644
index c9b3198d1b..0000000000
--- a/keymaps/fujitsu-amilo_li_2732
+++ /dev/null
@@ -1,3 +0,0 @@
-0xD9 brightnessdown # Fn+F8 brightness down
-0xEF brightnessup # Fn+F9 brightness up
-0xA9 switchvideomode # Fn+F10 Cycle between available video outputs
diff --git a/keymaps/fujitsu-amilo_pa_2548 b/keymaps/fujitsu-amilo_pa_2548
deleted file mode 100644
index f7b0c52444..0000000000
--- a/keymaps/fujitsu-amilo_pa_2548
+++ /dev/null
@@ -1,3 +0,0 @@
-0xE0 volumedown
-0xE1 volumeup
-0xE5 prog1
diff --git a/keymaps/fujitsu-amilo_pro_edition_v3505 b/keymaps/fujitsu-amilo_pro_edition_v3505
deleted file mode 100644
index fd95b000c6..0000000000
--- a/keymaps/fujitsu-amilo_pro_edition_v3505
+++ /dev/null
@@ -1,4 +0,0 @@
-0xA5 help # Fn+F1
-0xA9 switchvideomode # Fn+F3
-0xD9 brightnessdown # Fn+F8
-0xE0 brightnessup # Fn+F9
diff --git a/keymaps/fujitsu-amilo_pro_v3205 b/keymaps/fujitsu-amilo_pro_v3205
deleted file mode 100644
index 8cbf239464..0000000000
--- a/keymaps/fujitsu-amilo_pro_v3205
+++ /dev/null
@@ -1,2 +0,0 @@
-0xF4 f21 # FIXME: silent-mode decrease CPU/GPU clock
-0xF7 switchvideomode # Fn+F3
diff --git a/keymaps/fujitsu-amilo_si_1520 b/keymaps/fujitsu-amilo_si_1520
deleted file mode 100644
index 1419bd9b5e..0000000000
--- a/keymaps/fujitsu-amilo_si_1520
+++ /dev/null
@@ -1,6 +0,0 @@
-0xE1 wlan
-0xF3 wlan
-0xEE brightnessdown
-0xE0 brightnessup
-0xE2 bluetooth
-0xF7 video
diff --git a/keymaps/fujitsu-esprimo_mobile_v5 b/keymaps/fujitsu-esprimo_mobile_v5
deleted file mode 100644
index d3d056b366..0000000000
--- a/keymaps/fujitsu-esprimo_mobile_v5
+++ /dev/null
@@ -1,4 +0,0 @@
-0xA9 switchvideomode
-0xD9 brightnessdown
-0xDF sleep
-0xEF brightnessup
diff --git a/keymaps/fujitsu-esprimo_mobile_v6 b/keymaps/fujitsu-esprimo_mobile_v6
deleted file mode 100644
index 52c70c50cb..0000000000
--- a/keymaps/fujitsu-esprimo_mobile_v6
+++ /dev/null
@@ -1,2 +0,0 @@
-0xCE brightnessup
-0xEF brightnessdown
diff --git a/keymaps/genius-slimstar-320 b/keymaps/genius-slimstar-320
deleted file mode 100644
index d0a3656dd8..0000000000
--- a/keymaps/genius-slimstar-320
+++ /dev/null
@@ -1,35 +0,0 @@
-# Genius SlimStar 320
-#
-# Only buttons which are not properly mapped yet are configured below
-
-# "Scroll wheel", a circular up/down/left/right button. Aimed for scolling,
-# but since there are no scrollleft/scrollright, let's map to back/forward.
-0x900f0 scrollup
-0x900f1 scrolldown
-0x900f3 back
-0x900f2 forward
-
-# Multimedia buttons, left side (from left to right)
-# [W]
-0x900f5 wordprocessor
-# [Ex]
-0x900f6 spreadsheet
-# [P]
-0x900f4 presentation
-# Other five (calculator, playpause, stop, mute and eject) are OK
-
-# Right side, from left to right
-# [e]
-0xc0223 www
-# "man"
-0x900f7 chat
-# "Y"
-0x900fb prog1
-# [X]
-0x900f8 close
-# "picture"
-0x900f9 graphicseditor
-# "two windows"
-0x900fd scale
-# "lock"
-0x900fc screenlock
diff --git a/keymaps/hewlett-packard b/keymaps/hewlett-packard
deleted file mode 100644
index 3f5f5ace6f..0000000000
--- a/keymaps/hewlett-packard
+++ /dev/null
@@ -1,12 +0,0 @@
-0x81 fn_esc
-0x89 battery # Fn+F8
-0x8A screenlock # Fn+F6
-0x8B camera
-0x8C media # music
-0x8E dvd
-0xB1 help
-0xB3 f23 # FIXME: Auto brightness
-0xD7 wlan
-0x92 brightnessdown # Fn+F7 (Fn+F9 on 6730b)
-0x97 brightnessup # Fn+F8 (Fn+F10 on 6730b)
-0xEE switchvideomode # Fn+F4
diff --git a/keymaps/hewlett-packard-2510p_2530p b/keymaps/hewlett-packard-2510p_2530p
deleted file mode 100644
index 41ad2e9b5a..0000000000
--- a/keymaps/hewlett-packard-2510p_2530p
+++ /dev/null
@@ -1,2 +0,0 @@
-0xD8 f23 # touchpad off
-0xD9 f22 # touchpad on
diff --git a/keymaps/hewlett-packard-compaq_elitebook b/keymaps/hewlett-packard-compaq_elitebook
deleted file mode 100644
index 42007c5483..0000000000
--- a/keymaps/hewlett-packard-compaq_elitebook
+++ /dev/null
@@ -1,2 +0,0 @@
-0x88 presentation
-0xD9 help # I key (high keycode: "info")
diff --git a/keymaps/hewlett-packard-hdx9494nr b/keymaps/hewlett-packard-hdx9494nr
deleted file mode 100644
index 39e8b4c9f7..0000000000
--- a/keymaps/hewlett-packard-hdx9494nr
+++ /dev/null
@@ -1,3 +0,0 @@
-0xB2 www # Fn+F3
-0xD8 f23 # touchpad off
-0xD9 f22 # touchpad on
diff --git a/keymaps/hewlett-packard-pavilion b/keymaps/hewlett-packard-pavilion
deleted file mode 100644
index 60d1191106..0000000000
--- a/keymaps/hewlett-packard-pavilion
+++ /dev/null
@@ -1,3 +0,0 @@
-0x88 media # FIXME: quick play
-0xD8 f23 # touchpad off
-0xD9 f22 # touchpad on
diff --git a/keymaps/hewlett-packard-presario-2100 b/keymaps/hewlett-packard-presario-2100
deleted file mode 100644
index 1df39dcbd2..0000000000
--- a/keymaps/hewlett-packard-presario-2100
+++ /dev/null
@@ -1,3 +0,0 @@
-0xF0 help
-0xF1 screenlock
-0xF3 search
diff --git a/keymaps/hewlett-packard-tablet b/keymaps/hewlett-packard-tablet
deleted file mode 100644
index d19005ab90..0000000000
--- a/keymaps/hewlett-packard-tablet
+++ /dev/null
@@ -1,6 +0,0 @@
-0x82 prog2 # Funny Key
-0x83 prog1 # Q
-0x84 tab
-0x85 esc
-0x86 pageup
-0x87 pagedown
diff --git a/keymaps/hewlett-packard-tx2 b/keymaps/hewlett-packard-tx2
deleted file mode 100644
index 36a690fcf6..0000000000
--- a/keymaps/hewlett-packard-tx2
+++ /dev/null
@@ -1,3 +0,0 @@
-0xC2 media
-0xD8 f23 # Toggle touchpad button on tx2 (OFF)
-0xD9 f22 # Toggle touchpad button on tx2 (ON)
diff --git a/keymaps/hewlett-packard_elitebook-8440p b/keymaps/hewlett-packard_elitebook-8440p
deleted file mode 100644
index e0c2a1a859..0000000000
--- a/keymaps/hewlett-packard_elitebook-8440p
+++ /dev/null
@@ -1,5 +0,0 @@
-0x88 www
-0xA0 mute
-0xAE volumedown
-0xB0 volumeup
-0xEC mail
diff --git a/keymaps/hewlett-packard_elitebook-8460p b/keymaps/hewlett-packard_elitebook-8460p
deleted file mode 100644
index 59035f4005..0000000000
--- a/keymaps/hewlett-packard_elitebook-8460p
+++ /dev/null
@@ -1,3 +0,0 @@
-0xF8 wlan # Wireless HW switch button
-0xB3 prog1 # Fn+F11 - Ambient Light Sensor button
-0xB1 prog2 # Fn+ESC - System information button
diff --git a/keymaps/ibm-thinkpad-usb-keyboard-trackpoint b/keymaps/ibm-thinkpad-usb-keyboard-trackpoint
deleted file mode 100644
index 027e50bf88..0000000000
--- a/keymaps/ibm-thinkpad-usb-keyboard-trackpoint
+++ /dev/null
@@ -1,7 +0,0 @@
-0x900f0 screenlock
-0x900f1 wlan
-0x900f2 switchvideomode
-0x900f3 suspend
-0x900f4 brightnessup
-0x900f5 brightnessdown
-0x900f8 zoom
diff --git a/keymaps/inventec-symphony_6.0_7.0 b/keymaps/inventec-symphony_6.0_7.0
deleted file mode 100644
index 4a8b4ba5a7..0000000000
--- a/keymaps/inventec-symphony_6.0_7.0
+++ /dev/null
@@ -1,2 +0,0 @@
-0xF3 prog2
-0xF4 prog1
diff --git a/keymaps/lenovo-3000 b/keymaps/lenovo-3000
deleted file mode 100644
index 7973369a9d..0000000000
--- a/keymaps/lenovo-3000
+++ /dev/null
@@ -1,5 +0,0 @@
-0x8B switchvideomode # Fn+F7 video
-0x96 wlan # Fn+F5 wireless
-0x97 sleep # Fn+F4 suspend
-0x98 suspend # Fn+F12 hibernate
-0xB4 prog1 # Lenovo Care
diff --git a/keymaps/lenovo-ideapad b/keymaps/lenovo-ideapad
deleted file mode 100644
index 0de16466b4..0000000000
--- a/keymaps/lenovo-ideapad
+++ /dev/null
@@ -1,8 +0,0 @@
-# Key codes observed on S10-3, assumed valid on other IdeaPad models
-0x81 rfkill # does nothing in BIOS
-0x83 display_off # BIOS toggles screen state
-0xB9 brightnessup # does nothing in BIOS
-0xBA brightnessdown # does nothing in BIOS
-0xF1 camera # BIOS toggles camera power
-0xf2 f21 # touchpad toggle (key alternately emits F2 and F3)
-0xf3 f21
diff --git a/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint b/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint
deleted file mode 100644
index 78701acbc7..0000000000
--- a/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint
+++ /dev/null
@@ -1,13 +0,0 @@
-0x90012 screenlock # Fn+F2
-0x90013 battery # Fn+F3
-0x90014 wlan # Fn+F5
-0x90016 switchvideomode # Fn+F7
-0x90017 f21 # Fn+F8 touchpad toggle
-0x90019 suspend # Fn+F12
-0x9001A brightnessup # Fn+Home
-0x9001B brightnessdown # Fn+End
-0x9001D zoom # Fn+Space
-0x90011 prog1 # ThinkVantage button
-
-0x90015 camera # Fn+F6 headset/camera VoIP key ??
-0x90010 f20 # Microphone mute button; should be micmute, but see https://mail.gnome.org/archives/commits-list/2013-January/msg05822.html
diff --git a/keymaps/lenovo-thinkpad_x200_tablet b/keymaps/lenovo-thinkpad_x200_tablet
deleted file mode 100644
index f22ec65a5b..0000000000
--- a/keymaps/lenovo-thinkpad_x200_tablet
+++ /dev/null
@@ -1,6 +0,0 @@
-0x5D menu
-0x63 fn
-0x66 screenlock
-0x67 cyclewindows # bezel circular arrow
-0x68 setup # bezel setup / menu
-0x6c direction # rotate screen
diff --git a/keymaps/lenovo-thinkpad_x6_tablet b/keymaps/lenovo-thinkpad_x6_tablet
deleted file mode 100644
index 49c5f64f4c..0000000000
--- a/keymaps/lenovo-thinkpad_x6_tablet
+++ /dev/null
@@ -1,8 +0,0 @@
-0x6C f21 # rotate
-0x68 screenlock # screenlock
-0x6B esc # escape
-0x6D right # right on d-pad
-0x6E left # left on d-pad
-0x71 up # up on d-pad
-0x6F down # down on d-pad
-0x69 enter # enter on d-pad
diff --git a/keymaps/lg-x110 b/keymaps/lg-x110
deleted file mode 100644
index bbc29a13e9..0000000000
--- a/keymaps/lg-x110
+++ /dev/null
@@ -1,12 +0,0 @@
-0xA0 mute # Fn+F9
-0xAE volumedown # Fn+Left
-0xAF search # Fn+F3
-0xB0 volumeup # Fn+Right
-0xB1 battery # Fn+F10 Info
-0xB3 suspend # Fn+F12
-0xDF sleep # Fn+F4
-# 0xE2 bluetooth # satellite dish2
-0xE4 f21 # Fn+F5 Touchpad toggle
-0xF6 wlan # Fn+F6
-0xF7 reserved # Fn+Down brightness down
-0xF8 reserved # Fn+Up brightness up
diff --git a/keymaps/logitech-usb b/keymaps/logitech-usb
deleted file mode 100644
index b575aa7c47..0000000000
--- a/keymaps/logitech-usb
+++ /dev/null
@@ -1,6 +0,0 @@
-0x90001 shop # Shopping
-0x90002 config # iTouch
-0x90003 finance # Finance
-0x90004 prog1 # My Sites
-0x90005 prog2 # Community
-0xC0183 media # Media
diff --git a/keymaps/logitech-wave b/keymaps/logitech-wave
deleted file mode 100644
index 781dbe26f7..0000000000
--- a/keymaps/logitech-wave
+++ /dev/null
@@ -1,16 +0,0 @@
-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)
diff --git a/keymaps/logitech-wave-cordless b/keymaps/logitech-wave-cordless
deleted file mode 100644
index b40c4dbff7..0000000000
--- a/keymaps/logitech-wave-cordless
+++ /dev/null
@@ -1,15 +0,0 @@
-0xD4 zoomin
-0xCC zoomout
-0xC0183 media
-0xC1005 camera
-0xC101F zoomout
-0xC1020 zoomin
-0xC1041 wordprocessor
-0xC1042 spreadsheet
-0xC1043 calendar
-0xC1044 prog2 # Fn+F4 (program a)
-0xC1045 prog3 # Fn+F5 (program b)
-0xC1046 prog4 # Fn+F6 (program c)
-0xC1048 messenger
-0xC104A find # Fn+F10 (search www)
-0xC104C ejectclosecd
diff --git a/keymaps/logitech-wave-pro-cordless b/keymaps/logitech-wave-pro-cordless
deleted file mode 100644
index e7aa02206c..0000000000
--- a/keymaps/logitech-wave-pro-cordless
+++ /dev/null
@@ -1,12 +0,0 @@
-0xC01B6 camera
-0xC0183 media
-0xC0184 wordprocessor
-0xC0186 spreadsheet
-0xC018E calendar
-0xC0223 homepage
-0xC01BC messenger
-0xC018A mail
-0xC0221 search
-0xC00B8 ejectcd
-0xC022D zoomin
-0xC022E zoomout
diff --git a/keymaps/maxdata-pro_7000 b/keymaps/maxdata-pro_7000
deleted file mode 100644
index 0d5bbf3ce5..0000000000
--- a/keymaps/maxdata-pro_7000
+++ /dev/null
@@ -1,9 +0,0 @@
-0x97 prog2
-0x9F prog1
-0xA0 mute # Fn+F5
-0x82 www
-0xEC email
-0xAE volumedown # Fn+Down
-0xB0 volumeup # Fn+Up
-0xDF suspend # Fn+F2
-0xF5 help
diff --git a/keymaps/medion-fid2060 b/keymaps/medion-fid2060
deleted file mode 100644
index 75b1647e43..0000000000
--- a/keymaps/medion-fid2060
+++ /dev/null
@@ -1,2 +0,0 @@
-0x6B channeldown # Thottle Down
-0x6D channelup # Thottle Up
diff --git a/keymaps/medionnb-a555 b/keymaps/medionnb-a555
deleted file mode 100644
index b69618308b..0000000000
--- a/keymaps/medionnb-a555
+++ /dev/null
@@ -1,4 +0,0 @@
-0x63 www # N button
-0x66 prog1 # link 1 button
-0x67 email # envelope button
-0x69 prog2 # link 2 button
diff --git a/keymaps/micro-star b/keymaps/micro-star
deleted file mode 100644
index c283cde8bb..0000000000
--- a/keymaps/micro-star
+++ /dev/null
@@ -1,13 +0,0 @@
-0xA0 mute # Fn+F9
-0xAE volumedown # Fn+F7
-0xB0 volumeup # Fn+F8
-0xB2 www # e button
-0xDF sleep # Fn+F12
-0xE2 bluetooth # satellite dish2
-0xE4 f21 # Fn+F3 Touchpad disable
-0xEC email # envelope button
-0xEE camera # Fn+F6 camera disable
-0xF6 wlan # satellite dish1
-0xF7 brightnessdown # Fn+F4
-0xF8 brightnessup # Fn+F5
-0xF9 search
diff --git a/keymaps/module-ibm b/keymaps/module-ibm
deleted file mode 100644
index ee61b6cf3b..0000000000
--- a/keymaps/module-ibm
+++ /dev/null
@@ -1,16 +0,0 @@
-0x01 battery # Fn+F2
-0x02 screenlock # Fn+F3
-0x03 sleep # Fn+F4
-0x04 wlan # Fn+F5
-0x06 switchvideomode # Fn+F7
-0x07 zoom # Fn+F8 screen expand
-0x08 f24 # Fn+F9 undock
-0x0B suspend # Fn+F12
-0x0F brightnessup # Fn+Home
-0x10 brightnessdown # Fn+End
-0x11 kbdillumtoggle # Fn+PgUp - ThinkLight
-0x13 zoom # Fn+Space
-0x14 volumeup
-0x15 volumedown
-0x16 mute
-0x17 prog1 # ThinkPad/ThinkVantage button (high keycode: "vendor")
diff --git a/keymaps/module-lenovo b/keymaps/module-lenovo
deleted file mode 100644
index ed31899d0f..0000000000
--- a/keymaps/module-lenovo
+++ /dev/null
@@ -1,17 +0,0 @@
-0x1 screenlock # Fn+F2
-0x2 battery # Fn+F3
-0x3 sleep # Fn+F4
-0x4 wlan # Fn+F5
-0x6 switchvideomode # Fn+F7
-0x7 f21 # Fn+F8 touchpadtoggle
-0x8 f24 # Fn+F9 undock
-0xB suspend # Fn+F12
-0xF brightnessup # Fn+Home
-0x10 brightnessdown # Fn+End
-0x11 kbdillumtoggle # Fn+PgUp - ThinkLight
-0x13 zoom # Fn+Space
-0x14 volumeup
-0x15 volumedown
-0x16 mute
-0x17 prog1 # ThinkPad/ThinkVantage button (high keycode: "vendor")
-0x1A f20 # Microphone mute button; should be micmute, but see https://mail.gnome.org/archives/commits-list/2013-January/msg05822.html
diff --git a/keymaps/module-sony b/keymaps/module-sony
deleted file mode 100644
index 5d3742b463..0000000000
--- a/keymaps/module-sony
+++ /dev/null
@@ -1,8 +0,0 @@
-0x06 mute # Fn+F2
-0x07 volumedown # Fn+F3
-0x08 volumeup # Fn+F4
-0x09 brightnessdown # Fn+F5
-0x0A brightnessup # Fn+F6
-0x0B switchvideomode # Fn+F7
-0x0E zoom # Fn+F10
-0x10 suspend # Fn+F12
diff --git a/keymaps/module-sony-old b/keymaps/module-sony-old
deleted file mode 100644
index 596a34258a..0000000000
--- a/keymaps/module-sony-old
+++ /dev/null
@@ -1,2 +0,0 @@
-0x06 battery
-0x07 mute
diff --git a/keymaps/module-sony-vgn b/keymaps/module-sony-vgn
deleted file mode 100644
index cb4ce33717..0000000000
--- a/keymaps/module-sony-vgn
+++ /dev/null
@@ -1,8 +0,0 @@
-0x00 brightnessdown # Fn+F5
-0x10 brightnessup # Fn+F6
-0x11 switchvideomode # Fn+F7
-0x12 zoomout
-0x14 zoomin
-0x15 suspend # Fn+F12
-0x17 prog1
-0x20 media
diff --git a/keymaps/module-sony-vpc b/keymaps/module-sony-vpc
deleted file mode 100644
index 1b52779535..0000000000
--- a/keymaps/module-sony-vpc
+++ /dev/null
@@ -1,4 +0,0 @@
-# 0x05 touchpad_toggle # fn_f1 -> KEY_TOUCHPAD_TOGGLE
-0x05 f21 # fn_f1 -> KEY_F21 (The actual touchpad toggle)
-0x0d zoomout # fn_f9
-0x0e zoomin # fn_f10
diff --git a/keymaps/olpc-xo b/keymaps/olpc-xo
deleted file mode 100644
index 0fa497211a..0000000000
--- a/keymaps/olpc-xo
+++ /dev/null
@@ -1,74 +0,0 @@
-0x59 fn
-0x81 fn_esc
-0xF9 camera
-0xF8 sound # Fn+CAMERA = Mic
-
-
-# Function key mappings, as per
-# http://dev.laptop.org/ticket/10213#comment:20
-#
-# Unmodified F1-F8 produce F1-F8, so no remap necessary.
-# Unmodified F9-F12 control brightness and volume.
-0x43 brightnessdown
-0x44 brightnessup
-0x57 volumedown
-0x58 volumeup
-
-# Fn-modified fkeys all produce the unmodified version of the key.
-0xBB f1
-0xBC f2
-0xBD f3
-0xBE f4
-0xBF f5
-0xC0 f6
-0xC1 f7
-0xC2 f8
-0xC3 f9
-0xC4 f10
-0xD7 f11
-0xD8 f12
-
-
-# Using F13-F21 for the .5 F keys right now.
-0xF7 f13
-0xF6 f14
-0xF5 f15
-0xF4 f16
-0xF3 f17
-0xF2 f18
-0xF1 f19
-0xF0 f20
-0xEF f21
-
-0xEE chat
-0xE4 chat # Just mapping Fn+Chat to Chat for now
-0xDD menu # Frame
-0xDA prog1 # Fn+Frame
-
-# The Fn of some keys is other keys
-0xD3 delete
-0xD2 insert
-0xC9 pageup
-0xD1 pagedown
-0xC7 home
-0xCF end
-
-# Language key - don't ask what they are doing as KEY_HP
-0x73 hp
-0x7E hp
-
-0xDB leftmeta # left grab
-0xDC rightmeta # right grab
-0x85 rightmeta # Right grab releases on a different scancode
-0xD6 kbdillumtoggle # Fn+Space
-0x69 switchvideomode # Brightness key
-
-# Game keys
-0x65 kp8 # up
-0x66 kp2 # down
-0x67 kp4 # left
-0x68 kp6 # right
-0xE5 kp9 # pgup
-0xE6 kp3 # pgdn
-0xE7 kp7 # home
-0xE8 kp1 # end
diff --git a/keymaps/onkyo b/keymaps/onkyo
deleted file mode 100644
index 8fc4cffa92..0000000000
--- a/keymaps/onkyo
+++ /dev/null
@@ -1,14 +0,0 @@
-0xA0 mute # Fn+D
-0xAE volumedown # Fn+F
-0xB0 volumeup # Fn+G
-0xDF sleep # Fn+W
-0xE0 bluetooth # Fn+H
-0xE2 cyclewindows # Fn+Esc
-0xEE battery # Fn+Q
-0xF0 media # Fn+R
-0xF5 switchvideomode # Fn+E
-0xF6 camera # Fn+T
-0xF7 f21 # Fn+Y (touchpad toggle)
-0xF8 brightnessup # Fn+S
-0xF9 brightnessdown # Fn+A
-0xFB wlan # Fn+J
diff --git a/keymaps/oqo-model2 b/keymaps/oqo-model2
deleted file mode 100644
index b7f4851abe..0000000000
--- a/keymaps/oqo-model2
+++ /dev/null
@@ -1,5 +0,0 @@
-0x8E wlan
-0xF0 switchvideomode
-0xF1 mute
-0xF2 volumedown
-0xF3 volumeup
diff --git a/keymaps/samsung-other b/keymaps/samsung-other
deleted file mode 100644
index d950c2cbd9..0000000000
--- a/keymaps/samsung-other
+++ /dev/null
@@ -1,14 +0,0 @@
-0x74 prog1 # User key
-0x75 www
-0x78 mail
-0x82 switchvideomode # Fn+F4 CRT/LCD (high keycode: "displaytoggle")
-0x83 battery # Fn+F2
-0x84 prog1 # Fn+F5 backlight on/off
-0x86 wlan # Fn+F9
-0x88 brightnessup # Fn+Up
-0x89 brightnessdown # Fn+Down
-0xB1 prog2 # Fn+F7 run Samsung Magic Doctor (keypressed event is generated twice)
-0xB3 prog3 # Fn+F8 switch power mode (battery/dynamic/performance)
-0xB4 wlan # Fn+F9 (X60P)
-0xF7 f22 # Fn+F10 Touchpad on
-0xF9 f23 # Fn+F10 Touchpad off
diff --git a/keymaps/samsung-series-3 b/keymaps/samsung-series-3
deleted file mode 100644
index 303a428b47..0000000000
--- a/keymaps/samsung-series-3
+++ /dev/null
@@ -1,3 +0,0 @@
-0xCE prog1 # Fn+F1 launch control setting
-0xB3 prog2 # Fn+F11 performance mode
-0xD5 wlan # Fn+F12 Wi-Fi toggle
diff --git a/keymaps/samsung-series-9 b/keymaps/samsung-series-9
deleted file mode 100644
index c0712f02a0..0000000000
--- a/keymaps/samsung-series-9
+++ /dev/null
@@ -1,5 +0,0 @@
-0x96 kbdillumup # Fn+F8 keyboard backlight up
-0x97 kbdillumdown # Fn+F7 keyboard backlight down
-0xD5 wlan # Fn+F12 Wi-Fi toggle
-0xCE prog1 # Fn+F1 performance mode
-0x8D prog2 # Fn+F6 battery life extender
diff --git a/keymaps/samsung-sq1us b/keymaps/samsung-sq1us
deleted file mode 100644
index ea2141ef84..0000000000
--- a/keymaps/samsung-sq1us
+++ /dev/null
@@ -1,7 +0,0 @@
-0xD4 menu
-0xD8 f1
-0xD9 f10
-0xD6 f3
-0xD7 f9
-0xE4 f5
-0xEE f11
diff --git a/keymaps/samsung-sx20s b/keymaps/samsung-sx20s
deleted file mode 100644
index 9d954ee415..0000000000
--- a/keymaps/samsung-sx20s
+++ /dev/null
@@ -1,4 +0,0 @@
-0x74 mute
-0x75 mute
-0x77 f22 # Touchpad on
-0x79 f23 # Touchpad off
diff --git a/keymaps/toshiba-satellite_a100 b/keymaps/toshiba-satellite_a100
deleted file mode 100644
index 22007be71b..0000000000
--- a/keymaps/toshiba-satellite_a100
+++ /dev/null
@@ -1,2 +0,0 @@
-0xA4 stopcd
-0xB2 www
diff --git a/keymaps/toshiba-satellite_a110 b/keymaps/toshiba-satellite_a110
deleted file mode 100644
index 1429409351..0000000000
--- a/keymaps/toshiba-satellite_a110
+++ /dev/null
@@ -1,10 +0,0 @@
-0x92 stop
-0x93 www
-0x94 media
-0x9E f22 # Touchpad on
-0x9F f23 # Touchpad off
-0xB9 nextsong
-0xD9 brightnessup
-0xEE screenlock
-0xF4 previoussong
-0xF7 playpause
diff --git a/keymaps/toshiba-satellite_m30x b/keymaps/toshiba-satellite_m30x
deleted file mode 100644
index 26e0bbd939..0000000000
--- a/keymaps/toshiba-satellite_m30x
+++ /dev/null
@@ -1,6 +0,0 @@
-0xef brightnessdown
-0xd9 brightnessup
-0xee screenlock
-0x93 media
-0x9e f22 # touchpad enable
-0x9f f23 # touchpad disable
diff --git a/keymaps/zepto-znote b/keymaps/zepto-znote
deleted file mode 100644
index cf72fda47b..0000000000
--- a/keymaps/zepto-znote
+++ /dev/null
@@ -1,11 +0,0 @@
-0x93 switchvideomode # Fn+F3 Toggle Video Output
-0x95 brightnessdown # Fn+F4 Brightness Down
-0x91 brightnessup # Fn+F5 Brightness Up
-0xA5 f23 # Fn+F6 Disable Touchpad
-0xA6 f22 # Fn+F6 Enable Touchpad
-0xA7 bluetooth # Fn+F10 Enable Bluetooth
-0XA9 bluetooth # Fn+F10 Disable Bluetooth
-0xF1 wlan # RF Switch Off
-0xF2 wlan # RF Switch On
-0xF4 prog1 # P1 Button
-0xF3 prog2 # P2 Button
diff --git a/src/udev/keymap/.gitignore b/src/udev/keymap/.gitignore
deleted file mode 100644
index 4567584f4e..0000000000
--- a/src/udev/keymap/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-keyboard-force-release.sh
-keys-from-name.gperf
-keys-from-name.h
-keys-to-name.h
-keys.txt
diff --git a/src/udev/keymap/95-keyboard-force-release.rules b/src/udev/keymap/95-keyboard-force-release.rules
deleted file mode 100644
index 8bfe17d679..0000000000
--- a/src/udev/keymap/95-keyboard-force-release.rules
+++ /dev/null
@@ -1,60 +0,0 @@
-# Set model specific atkbd force_release quirk
-#
-# Several laptops have hotkeys which don't generate release events,
-# which can cause problems with software key repeat.
-# The atkbd driver has a quirk handler for generating synthetic
-# release events, which can be configured via sysfs since 2.6.32.
-# Simply add a file with a list of scancodes for your laptop model
-# in /usr/lib/udev/keymaps, and add a rule here.
-# If the hotkeys also need a keymap assignment you can copy the
-# scancodes from the keymap file, otherwise you can run
-# /usr/lib/udev/keymap -i /dev/input/eventX
-# on a Linux vt to find out.
-
-ACTION=="remove", GOTO="force_release_end"
-SUBSYSTEM!="serio", GOTO="force_release_end"
-KERNEL!="serio*", GOTO="force_release_end"
-DRIVER!="atkbd", GOTO="force_release_end"
-
-ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}"
-
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", RUN+="keyboard-force-release.sh $devpath samsung-other"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*90X3A*|*900X3*|*900X4*", RUN+="keyboard-force-release.sh $devpath samsung-series-9"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*300E5*|*300E4*|*300E7*|*270E5*|*270E4*", RUN+="keyboard-force-release.sh $devpath samsung-series-3"
-
-ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557|Studio 1558", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="*Latitude*|*Precision*", RUN+="keyboard-force-release.sh $devpath dell-touchpad"
-ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="XPS*", RUN+="keyboard-force-release.sh $devpath dell-xps"
-
-ENV{DMI_VENDOR}=="FUJITSU SIEMENS", ATTR{[dmi/id]product_name}=="AMILO*", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="FOXCONN", ATTR{[dmi/id]product_name}=="QBOOK", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="MTC", ATTR{[dmi/id]product_version}=="A0", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="Mio Technology", ATTR{[dmi/id]product_name}=="N890", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="PEGATRON CORP.", ATTR{[dmi/id]product_name}=="Spring Peak", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite [uU]300*|Satellite Pro [uU]300*|Satellite [uU]305*|SATELLITE [uU]500*", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="Viooo Corporation", ATTR{[dmi/id]product_name}=="PT17", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-# These are all the HP laptops that setup a touchpad toggle key
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keyboard-force-release.sh $devpath hp-other"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keyboard-force-release.sh $devpath hp-other"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC|HDX9494NR", RUN+="keyboard-force-release.sh $devpath hp-other"
-
-ENV{DMI_VENDOR}=="Zepto", ATTR{[dmi/id]product_name}=="Znote 6615WD", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="Zepto", ATTR{[dmi/id]product_name}=="Znote", ATTR{[dmi/id]product_version}=="6625WD", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="HANNspree", ATTR{[dmi/id]product_name}=="SN10E100", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="GIGABYTE", ATTR{[dmi/id]product_name}=="i1520M", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="BenQ", ATTR{[dmi/id]product_name}=="*nScreen*|Joybook Lite*", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-ENV{DMI_VENDOR}=="DIXONSP", ATTR{[dmi/id]product_name}=="DIXON*", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
-
-LABEL="force_release_end"
diff --git a/src/udev/keymap/95-keymap.rules b/src/udev/keymap/95-keymap.rules
deleted file mode 100644
index 4d6ec556c2..0000000000
--- a/src/udev/keymap/95-keymap.rules
+++ /dev/null
@@ -1,181 +0,0 @@
-# Set model specific hotkey keycodes.
-#
-# Key map overrides can be specified by either giving scancode/keyname pairs
-# directly as keymap arguments (if there are just one or two to change), or as
-# a file name (in /usr/lib/udev/keymaps), which has to contain scancode/keyname
-# pairs.
-
-ACTION=="remove", GOTO="keyboard_end"
-KERNEL!="event*", GOTO="keyboard_end"
-ENV{ID_INPUT_KEY}=="", GOTO="keyboard_end"
-SUBSYSTEMS=="bluetooth", GOTO="keyboard_end"
-
-SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
-SUBSYSTEMS=="usb", GOTO="keyboard_usbcheck"
-GOTO="keyboard_modulecheck"
-
-#
-# The following are external USB keyboards
-#
-
-LABEL="keyboard_usbcheck"
-
-ENV{ID_VENDOR}=="Genius", ENV{ID_MODEL_ID}=="0708", ENV{ID_USB_INTERFACE_NUM}=="01", RUN+="keymap $name genius-slimstar-320"
-ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Multimedia Keyboard", RUN+="keymap $name logitech-wave"
-ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Receiver", RUN+="keymap $name logitech-wave-cordless"
-ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="* Logitech USB Keyboard*", RUN+="keymap $name logitech-usb"
-# Logitech Cordless Wave Pro looks slightly weird; some hotkeys are coming through the mouse interface
-ENV{ID_VENDOR_ID}=="046d", ENV{ID_MODEL_ID}=="c52[9b]", ATTRS{name}=="Logitech USB Receiver", RUN+="keymap $name logitech-wave-pro-cordless"
-
-ENV{ID_VENDOR}=="Lite-On_Technology_Corp*", ATTRS{name}=="Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint", RUN+="keymap $name lenovo-thinkpad-usb-keyboard-trackpoint"
-ENV{ID_VENDOR_ID}=="04b3", ENV{ID_MODEL_ID}=="301[89]", RUN+="keymap $name ibm-thinkpad-usb-keyboard-trackpoint"
-
-ENV{ID_VENDOR}=="Microsoft", ENV{ID_MODEL_ID}=="00db", RUN+="keymap $name 0xc022d zoomin 0xc022e zoomout"
-
-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}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-lenovo"
-ENV{DMI_VENDOR}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="Ideapad extra buttons", RUN+="keymap $name 0x42 f23 0x43 f22"
-
-ENV{DMI_VENDOR}=="IBM*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-ibm"
-ENV{DMI_VENDOR}=="Sony*", KERNELS=="input*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony"
-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", 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"
-
-# Some Sony VGN/VPC models have yet another one
-ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="VGN-AR71*|VGN-FW*|VGN-Z21*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-vgn"
-ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="VPC*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-vpc"
-
-
-#
-# The following rules belong to standard i8042 AT keyboard with high key codes.
-#
-
-DRIVERS=="atkbd", GOTO="keyboard_vendorcheck"
-GOTO="keyboard_end"
-
-LABEL="keyboard_vendorcheck"
-
-ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell"
-ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 910|Inspiron 1010|Inspiron 1011|Inspiron 1012|Inspiron 1110|Inspiron 1210", RUN+="keymap $name 0x84 wlan"
-ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Latitude XT2", RUN+="keymap $name dell-latitude-xt2"
-
-ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo"
-
-ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*3000*", RUN+="keymap $name lenovo-3000"
-ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X6*", ATTR{[dmi/id]product_version}=="* Tablet", RUN+="keymap $name lenovo-thinkpad_x6_tablet"
-ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X2* Tablet*", ATTR{[dmi/id]product_version}=="* Tablet", RUN+="keymap $name lenovo-thinkpad_x200_tablet"
-ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*IdeaPad*", RUN+="keymap $name lenovo-ideapad"
-ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_name}=="S10-*", RUN+="keymap $name lenovo-ideapad"
-ENV{DMI_VENDOR}=="LENOVO", ATTR{[dmi/id]product_version}=="*IdeaPad Y550*", RUN+="keymap $name 0x95 media 0xA3 play"
-ENV{DMI_VENDOR}=="LENOVO", ATTR{[dmi/id]product_version}=="*Lenovo V480*", RUN+="keymap $name 0xf1 f21"
-# 0xf1 is touchpad toggle, 0xCE is microphone mute in Lenovo U300s
-ENV{DMI_VENDOR}=="LENOVO", ATTR{[dmi/id]product_version}=="*IdeaPad U300s*", RUN+="keymap $name 0xf1 f21 0xCE f20"
-
-ENV{DMI_VENDOR}=="Hewlett-Packard*", RUN+="keymap $name hewlett-packard"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][aA][bB][lL][eE][tT]*", RUN+="keymap $name hewlett-packard-tablet"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keymap $name hewlett-packard-pavilion"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*Compaq*|*EliteBook*|*2230s*", RUN+="keymap $name hewlett-packard-compaq_elitebook"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*Presario*CQ*", RUN+="keymap $name 0xD8 f21 0xD9 f21"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keymap $name hewlett-packard-2510p_2530p"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keymap $name hewlett-packard-tx2"
-ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*", RUN+="keymap $name hewlett-packard-presario-2100"
-ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www"
-ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill 0xB2 www"
-ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP EliteBook 8440p", RUN+="keymap $name hewlett-packard_elitebook-8440p"
-ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP EliteBook 8460p", RUN+="keymap $name hewlett-packard_elitebook-8460p"
-ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HDX9494NR", RUN+="keymap $name hewlett-packard-hdx9494nr"
-# HP Pavilion dv6315ea has empty DMI_VENDOR
-ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play
-
-# Gateway clone of Acer Aspire One AOA110/AOA150
-ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer"
-
-ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C3[01]0*", RUN+="keymap $name acer-travelmate_c300"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|TravelMate*4720*|TravelMate*7720*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*4720*", RUN+="keymap $name 0xB2 www 0xEE screenlock"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5720*", RUN+="keymap $name acer-aspire_5720"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 8930", RUN+="keymap $name acer-aspire_8930"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_serial}=="ZG8*", RUN+="keymap $name acer-aspire_5720"
-
-ENV{DMI_VENDOR}=="*BenQ*", ATTR{[dmi/id]product_name}=="*Joybook R22*", RUN+="keymap $name 0x6E wlan"
-
-ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*AMILO Pro V3205*", RUN+="keymap $name fujitsu-amilo_pro_v3205"
-ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*AMILO Pa 2548*", RUN+="keymap $name fujitsu-amilo_pa_2548"
-ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*ESPRIMO Mobile V5*", RUN+="keymap $name fujitsu-esprimo_mobile_v5"
-ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*ESPRIMO Mobile V6*", RUN+="keymap $name fujitsu-esprimo_mobile_v6"
-ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*AMILO Pro Edition V3505*", RUN+="keymap $name fujitsu-amilo_pro_edition_v3505"
-ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*Amilo Si 1520*", RUN+="keymap $name fujitsu-amilo_si_1520"
-ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="AMILO*M*", RUN+="keymap $name 0x97 prog2 0x9F prog1"
-ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="Amilo Li 1718", RUN+="keymap $name 0xD6 wlan"
-ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="AMILO Li 2732", RUN+="keymap $name fujitsu-amilo_li_2732"
-
-ENV{DMI_VENDOR}=="LG*", ATTR{[dmi/id]product_name}=="*X110*", RUN+="keymap $name lg-x110"
-
-ENV{DMI_VENDOR}=="MEDION*", ATTR{[dmi/id]product_name}=="*FID2060*", RUN+="keymap $name medion-fid2060"
-ENV{DMI_VENDOR}=="MEDIONNB", ATTR{[dmi/id]product_name}=="A555*", RUN+="keymap $name medionnb-a555"
-
-ENV{DMI_VENDOR}=="MICRO-STAR*|Micro-Star*", RUN+="keymap $name micro-star"
-ENV{DMI_VENDOR}=="MICRO-STAR*|Micro-Star*", ATTR{[dmi/id]product_name}=="GE60*|GE70*", RUN+="keymap $name 0xC2 ejectcd"
-
-# some MSI models generate ACPI/input events on the LNXVIDEO input devices,
-# plus some extra synthesized ones on atkbd as an echo of actually changing the
-# brightness; so ignore those atkbd ones, to avoid loops
-ENV{DMI_VENDOR}=="MICRO-STAR*", ATTR{[dmi/id]product_name}=="*U-100*|*U100*|*N033", RUN+="keymap $name 0xF7 reserved 0xF8 reserved"
-
-# MSI Wind U90/U100 generates separate touchpad on/off keycodes so ignore touchpad toggle keycode
-ENV{DMI_VENDOR}=="MICRO-STAR*", ATTR{[dmi/id]product_name}=="U90/U100", RUN+="keymap $name 0xE4 reserved"
-
-ENV{DMI_VENDOR}=="INVENTEC", ATTR{[dmi/id]product_name}=="SYMPHONY 6.0/7.0", RUN+="keymap $name inventec-symphony_6.0_7.0"
-
-ENV{DMI_VENDOR}=="MAXDATA", ATTR{[dmi/id]product_name}=="Pro 7000*", RUN+="keymap $name maxdata-pro_7000"
-
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", RUN+="keymap $name samsung-other"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*SX20S*", RUN+="keymap $name samsung-sx20s"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="SQ1US", RUN+="keymap $name samsung-sq1us"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*700Z*", RUN+="keymap $name 0xBA ejectcd 0x96 keyboardbrightnessup 0x97 keyboardbrightnessdown"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*700T*", RUN+="keymap $name 0xAD leftmeta"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*90X3A*|*900X3*|*900X4*", RUN+="keymap $name samsung-series-9"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*300E5*|*300E4*|*300E7*|*270E5*|*270E4*", RUN+="keymap $name samsung-series-3"
-
-ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="SATELLITE A100", RUN+="keymap $name toshiba-satellite_a100"
-ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite A110", RUN+="keymap $name toshiba-satellite_a110"
-ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite M30X", RUN+="keymap $name toshiba-satellite_m30x"
-
-ENV{DMI_VENDOR}=="OQO Inc.*", ATTR{[dmi/id]product_name}=="OQO Model 2*", RUN+="keymap $name oqo-model2"
-
-ENV{DMI_VENDOR}=="ONKYO CORPORATION", ATTR{[dmi/id]product_name}=="ONKYOPC", RUN+="keymap $name onkyo"
-
-ENV{DMI_VENDOR}=="ASUS", RUN+="keymap $name asus"
-
-ENV{DMI_VENDOR}=="VIA", ATTR{[dmi/id]product_name}=="K8N800", ATTR{[dmi/id]product_version}=="VT8204B", RUN+="keymap $name 0x81 prog1"
-
-ENV{DMI_VENDOR}=="Zepto", ATTR{[dmi/id]product_name}=="Znote", ATTR{[dmi/id]product_version}=="62*|63*", RUN+="keymap $name zepto-znote"
-
-ENV{DMI_VENDOR}=="Everex", ATTR{[dmi/id]product_name}=="XT5000*", RUN+="keymap $name everex-xt5000"
-
-ENV{DMI_VENDOR}=="COMPAL", ATTR{[dmi/id]product_name}=="HEL80I", RUN+="keymap $name 0x84 wlan"
-
-ENV{DMI_VENDOR}=="OLPC", ATTR{[dmi/id]product_name}=="XO", RUN+="keymap $name olpc-xo"
-
-ENV{DMI_VENDOR}=="Alienware*", ATTR{[dmi/id]product_name}=="M14xR1", RUN+="keymap $name 0x8A ejectcd"
-
-LABEL="keyboard_end"
diff --git a/src/udev/keymap/README.keymap.txt b/src/udev/keymap/README.keymap.txt
deleted file mode 100644
index 2cf2a4e88c..0000000000
--- a/src/udev/keymap/README.keymap.txt
+++ /dev/null
@@ -1,97 +0,0 @@
-= The udev keymap tool =
-
-== Introduction ==
-
-This udev extension configures computer model specific key mappings. This is
-particularly necessary for the non-standard extra keys found on many laptops,
-such as "brightness up", "next song", "www browser", or "suspend". Often these
-are accessed with the Fn key.
-
-Every key produces a "scan code", which is highly vendor/model specific for the
-nonstandard keys. This tool maintains mappings for these scan codes to standard
-"key codes", which denote the "meaning" of the key. The key codes are defined
-in /usr/include/linux/input.h.
-
-If some of your keys on your keyboard are not working at all, or produce the
-wrong effect, then a very likely cause of this is that the scan code -> key
-code mapping is incorrect on your computer.
-
-== Structure ==
-
-udev-keymap consists of the following parts:
-
- keymaps/*:: mappings of scan codes to key code names
-
- 95-keymap.rules:: udev rules for mapping system vendor/product names and
- input module names to one of the keymaps above
-
- keymap:: manipulate an evdev input device:
- * write a key map file into a device (used by udev rules)
- * dump current scan → key code mapping
- * interactively display scan and key codes of pressed keys
-
- findkeyboards:: display evdev input devices which belong to actual keyboards,
- i. e. those suitable for the keymap program
-
-== Fixing broken keys ==
-
-In order to make a broken key work on your system and send it back to upstream
-for inclusion you need to do the following steps:
-
- 1. Find the keyboard device.
-
- Run /usr/lib/udev/findkeyboards. This should always give you an "AT
- keyboard" and possibly a "module". Some laptops (notably Thinkpads, Sonys, and
- Acers) have multimedia/function keys on a separate input device instead of the
- primary keyboard. The keyboard device should have a name like "input/event3".
- In the following commands, the name will be written as "input/eventX" (replace
- X with the appropriate number).
-
- 2. Find broken scan codes:
-
- sudo /usr/lib/udev/keymap -i input/eventX
-
- Press all multimedia/function keys and check if the key name that gets printed
- out is plausible. If it is unknown or wrong, write down the scan code (looks
- like "0x1E") and the intended functionality of this key. Look in
- /usr/include/linux/input.h for an available KEY_XXXXX constant which most
- closely approximates this functionality and write it down as the new key code.
-
- For example, you might press a key labeled "web browser" which currently
- produces "unknown". Note down this:
-
- 0x1E www # Fn+F2 web browser
-
- Repeat that for all other keys. Write the resulting list into a file. Look at
- /usr/lib/udev/keymaps/ for existing key map files and make sure that you use the
- same structure.
-
- If the key only ever works once and then your keyboard (or the entire desktop)
- gets stuck for a long time, then it is likely that the BIOS fails to send a
- corresponding "key release" event after the key press event. Please note down
- this case as well, as it can be worked around in
- /usr/lib/udev/keymaps/95-keyboard-force-release.rules .
-
- 3. Find out your system vendor and product:
-
- cat /sys/class/dmi/id/sys_vendor
- cat /sys/class/dmi/id/product_name
-
- 4. Generate a device dump with "udevadm info --export-db > /tmp/udev-db.txt".
-
- 6. Send the system vendor/product names, the key mapping from step 2,
- and /tmp/udev-db.txt from step 4 to the linux-hotplug@vger.kernel.org mailing
- list, so that they can be included in the next release.
-
-For local testing, copy your map file to /usr/lib/udev/keymaps/ with an appropriate
-name, and add an appropriate udev rule to /usr/lib/udev/rules.d/95-keymap.rules:
-
- * If you selected an "AT keyboard", add the rule to the section after
- 'LABEL="keyboard_vendorcheck"'.
-
- * If you selected a "module", add the rule to the top section where the
- "ThinkPad Extra Buttons" are.
-
-== Author ==
-
-keymap is written and maintained by Martin Pitt <martin.pitt@ubuntu.com>.
diff --git a/src/udev/keymap/check-keymaps.sh b/src/udev/keymap/check-keymaps.sh
deleted file mode 100755
index c4572745e0..0000000000
--- a/src/udev/keymap/check-keymaps.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-# check that all key names in keymaps/* are known in <linux/input.h>
-# and that all key maps listed in the rules are valid and present in
-# Makefile.am
-SRCDIR=${1:-.}
-KEYLIST=${2:-src/udev/keymap/keys.txt}
-KEYMAPS_DIR=$SRCDIR/keymaps
-RULES=$SRCDIR/src/udev/keymap/95-keymap.rules
-
-[ -e "$KEYLIST" ] || {
- echo "need $KEYLIST please build first" >&2
- exit 1
-}
-
-missing=$(join -v 2 <(awk '{print tolower(substr($1,5))}' $KEYLIST | sort -u) \
- <(grep -hv '^#' ${KEYMAPS_DIR}/*| awk '{print $2}' | sort -u))
-[ -z "$missing" ] || {
- echo "ERROR: unknown key names in keymaps/*:" >&2
- echo "$missing" >&2
- exit 1
-}
-
-# check that all maps referred to in $RULES exist
-maps=$(sed -rn '/keymap \$name/ { s/^.*\$name ([^"[:space:]]+).*$/\1/; p }' $RULES)
-for m in $maps; do
- # ignore inline mappings
- [ "$m" = "${m#0x}" ] || continue
-
- [ -e ${KEYMAPS_DIR}/$m ] || {
- echo "ERROR: unknown map name in $RULES: $m" >&2
- exit 1
- }
- grep -q "keymaps/$m\>" $SRCDIR/Makefile.am || {
- echo "ERROR: map file $m is not added to Makefile.am" >&2
- exit 1
- }
-done
diff --git a/src/udev/keymap/findkeyboards b/src/udev/keymap/findkeyboards
deleted file mode 100755
index c6b50d12d0..0000000000
--- a/src/udev/keymap/findkeyboards
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh -e
-# Find "real" keyboard devices and print their device path.
-# Author: Martin Pitt <martin.pitt@ubuntu.com>
-#
-# Copyright (C) 2009, Canonical Ltd.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-
-# returns OK if $1 contains $2
-strstr() {
- [ "${1#*$2*}" != "$1" ]
-}
-
-# returns OK if $1 contains $2 at the beginning
-str_starts() {
- [ "${1#$2*}" != "$1" ]
-}
-
-str_line_starts() {
- while read a; do str_starts "$a" "$1" && return 0;done
- return 1;
-}
-
-# print a list of input devices which are keyboard-like
-keyboard_devices() {
- # standard AT keyboard
- for dev in `udevadm trigger --dry-run --verbose --property-match=ID_INPUT_KEYBOARD=1`; do
- env=`udevadm info --query=env --path=$dev`
- # filter out non-event devices, such as the parent input devices which have no devnode
- if ! echo "$env" | str_line_starts 'DEVNAME='; then
- continue
- fi
- walk=`udevadm info --attribute-walk --path=$dev`
- if strstr "$walk" 'DRIVERS=="atkbd"'; then
- echo -n 'AT keyboard: '
- elif echo "$env" | str_line_starts 'ID_USB_DRIVER=usbhid'; then
- echo -n 'USB keyboard: '
- else
- echo -n 'Unknown type: '
- fi
- udevadm info --query=name --path=$dev
- done
-
- # modules
- module=$(udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='*Extra Buttons')
- module="$module
- $(udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='*extra buttons')"
- module="$module
- $(udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='Sony Vaio Keys')"
- for m in $module; do
- for evdev in $m/event*/dev; do
- if [ -e "$evdev" ]; then
- echo -n 'module: '
- udevadm info --query=name --path=${evdev%%/dev}
- fi
- done
- done
-}
-
-keyboard_devices
diff --git a/src/udev/keymap/keyboard-force-release.sh.in b/src/udev/keymap/keyboard-force-release.sh.in
deleted file mode 100755
index b82674840f..0000000000
--- a/src/udev/keymap/keyboard-force-release.sh.in
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh -e
-# read list of scancodes, convert hex to decimal and
-# append to the atkbd force_release sysfs attribute
-# $1 sysfs devpath for serioX
-# $2 file with scancode list (hex or dec)
-
-case "$2" in
- /*) scf="$2" ;;
- *) scf="@udevlibexecdir@/keymaps/force-release/$2" ;;
-esac
-
-read attr <"/sys/$1/force_release"
-while read scancode dummy; do
- case "$scancode" in
- \#*) ;;
- *)
- scancode=$(($scancode))
- attr="$attr${attr:+,}$scancode"
- ;;
- esac
-done <"$scf"
-echo "$attr" >"/sys/$1/force_release"
diff --git a/src/udev/keymap/keymap.c b/src/udev/keymap/keymap.c
deleted file mode 100644
index ae0a19d3a3..0000000000
--- a/src/udev/keymap/keymap.c
+++ /dev/null
@@ -1,453 +0,0 @@
-/*
- * keymap - dump keymap of an evdev device or set a new keymap from a file
- *
- * Based on keyfuzz by Lennart Poettering <mzqrovna@0pointer.net>
- * Adapted for udev-extras by Martin Pitt <martin.pitt@ubuntu.com>
- *
- * Copyright (C) 2006, Lennart Poettering
- * Copyright (C) 2009, Canonical Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdint.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <errno.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <getopt.h>
-#include <sys/ioctl.h>
-#include <linux/limits.h>
-#include <linux/input.h>
-
-static const struct key* lookup_key (const char *str, unsigned int len);
-
-#include "keys-from-name.h"
-#include "keys-to-name.h"
-#include "macro.h"
-#include "util.h"
-
-#define MAX_SCANCODES 1024
-
-static int evdev_open(const char *dev)
-{
- int fd;
- char fn[PATH_MAX];
-
- if (!startswith(dev, "/dev")) {
- snprintf(fn, sizeof(fn), "/dev/%s", dev);
- dev = fn;
- }
-
- if ((fd = open(dev, O_RDWR)) < 0) {
- fprintf(stderr, "error open('%s'): %m\n", dev);
- return -1;
- }
- return fd;
-}
-
-static int evdev_get_keycode(int fd, unsigned scancode, int e)
-{
- unsigned codes[2];
-
- codes[0] = scancode;
- if (ioctl(fd, EVIOCGKEYCODE, codes) < 0) {
- if (e && errno == EINVAL) {
- return -2;
- } else {
- fprintf(stderr, "EVIOCGKEYCODE for scan code 0x%x: %m\n", scancode);
- return -1;
- }
- }
- return codes[1];
-}
-
-static int evdev_set_keycode(int fd, unsigned scancode, int keycode)
-{
- unsigned codes[2];
-
- codes[0] = scancode;
- codes[1] = (unsigned) keycode;
-
- if (ioctl(fd, EVIOCSKEYCODE, codes) < 0) {
- fprintf(stderr, "EVIOCSKEYCODE: %m\n");
- return -1;
- }
- return 0;
-}
-
-static int evdev_driver_version(int fd, char *v, size_t l)
-{
- int version;
-
- if (ioctl(fd, EVIOCGVERSION, &version)) {
- fprintf(stderr, "EVIOCGVERSION: %m\n");
- return -1;
- }
-
- snprintf(v, l, "%i.%i.%i.", version >> 16, (version >> 8) & 0xff, version & 0xff);
- return 0;
-}
-
-static int evdev_device_name(int fd, char *n, size_t l)
-{
- if (ioctl(fd, EVIOCGNAME(l), n) < 0) {
- fprintf(stderr, "EVIOCGNAME: %m\n");
- return -1;
- }
- return 0;
-}
-
-/* Return a lower-case string with KEY_ prefix removed */
-static const char* format_keyname(const char* key) {
- static char result[101];
- const char* s;
- int len;
-
- for (s = key+4, len = 0; *s && len < 100; ++len, ++s)
- result[len] = tolower(*s);
- result[len] = '\0';
- return result;
-}
-
-static int dump_table(int fd) {
- char version[256], name[256];
- unsigned scancode;
- int r = -1;
-
- if (evdev_driver_version(fd, version, sizeof(version)) < 0)
- goto fail;
-
- if (evdev_device_name(fd, name, sizeof(name)) < 0)
- goto fail;
-
- printf("### evdev %s, driver '%s'\n", version, name);
-
- r = 0;
- for (scancode = 0; scancode < MAX_SCANCODES; scancode++) {
- int keycode;
-
- if ((keycode = evdev_get_keycode(fd, scancode, 1)) < 0) {
- if (keycode == -2)
- continue;
- r = -1;
- break;
- }
-
- if (keycode < KEY_MAX && key_names[keycode])
- printf("0x%03x %s\n", scancode, format_keyname(key_names[keycode]));
- else
- printf("0x%03x 0x%03x\n", scancode, keycode);
- }
-fail:
- return r;
-}
-
-static void set_key(int fd, const char* scancode_str, const char* keyname)
-{
- unsigned scancode;
- char *endptr;
- char t[105] = "KEY_UNKNOWN";
- const struct key *k;
-
- scancode = (unsigned) strtol(scancode_str, &endptr, 0);
- if (*endptr != '\0') {
- fprintf(stderr, "ERROR: Invalid scancode\n");
- exit(1);
- }
-
- snprintf(t, sizeof(t), "KEY_%s", keyname);
-
- if (!(k = lookup_key(t, strlen(t)))) {
- fprintf(stderr, "ERROR: Unknown key name '%s'\n", keyname);
- exit(1);
- }
-
- if (evdev_set_keycode(fd, scancode, k->id) < 0)
- fprintf(stderr, "setting scancode 0x%2X to key code %i failed\n",
- scancode, k->id);
- else
- printf("setting scancode 0x%2X to key code %i\n",
- scancode, k->id);
-}
-
-static int merge_table(int fd, FILE *f) {
- int r = 0;
- int line = 0;
-
- while (!feof(f)) {
- char s[256], *p;
- unsigned scancode;
- int new_keycode, old_keycode;
-
- if (!fgets(s, sizeof(s), f))
- break;
-
- line++;
- p = s+strspn(s, "\t ");
- if (*p == '#' || *p == '\n')
- continue;
-
- if (sscanf(p, "%i %i", &scancode, &new_keycode) != 2) {
- char t[105] = "KEY_UNKNOWN";
- const struct key *k;
-
- if (sscanf(p, "%i %100s", &scancode, t+4) != 2) {
- fprintf(stderr, "WARNING: Parse failure at line %i, ignoring.\n", line);
- r = -1;
- continue;
- }
-
- if (!(k = lookup_key(t, strlen(t)))) {
- fprintf(stderr, "WARNING: Unknown key '%s' at line %i, ignoring.\n", t, line);
- r = -1;
- continue;
- }
-
- new_keycode = k->id;
- }
-
-
- if ((old_keycode = evdev_get_keycode(fd, scancode, 0)) < 0) {
- r = -1;
- continue;
- }
-
- if (evdev_set_keycode(fd, scancode, new_keycode) < 0) {
- r = -1;
- continue;
- }
-
- if (new_keycode != old_keycode)
- fprintf(stderr, "Remapped scancode 0x%02x to 0x%02x (prior: 0x%02x)\n",
- scancode, new_keycode, old_keycode);
- }
-
- fclose(f);
- return r;
-}
-
-
-/* read one event; return 1 if valid */
-static int read_event(int fd, struct input_event* ev)
-{
- int ret;
- ret = read(fd, ev, sizeof(struct input_event));
-
- if (ret < 0) {
- perror("read");
- return 0;
- }
- if (ret != sizeof(struct input_event)) {
- fprintf(stderr, "did not get enough data for event struct, aborting\n");
- return 0;
- }
-
- return 1;
-}
-
-static void print_key(unsigned scancode, uint16_t keycode, int has_scan, int has_key)
-{
- const char *keyname;
-
- /* ignore key release events */
- if (has_key == 1)
- return;
-
- if (has_key == 0 && has_scan != 0) {
- fprintf(stderr, "got scan code event 0x%02X without a key code event\n",
- scancode);
- return;
- }
-
- if (has_scan != 0)
- printf("scan code: 0x%02X ", scancode);
- else
- printf("(no scan code received) ");
-
- keyname = key_names[keycode];
- if (keyname != NULL)
- printf("key code: %s\n", format_keyname(keyname));
- else
- printf("key code: %03X\n", keycode);
-}
-
-static void interactive(int fd)
-{
- struct input_event ev;
- unsigned last_scan = 0;
- uint16_t last_key = 0;
- int has_scan; /* boolean */
- int has_key; /* 0: none, 1: release, 2: press */
-
- /* grab input device */
- ioctl(fd, EVIOCGRAB, 1);
- puts("Press ESC to finish, or Control-C if this device is not your primary keyboard");
-
- has_scan = has_key = 0;
- while (read_event(fd, &ev)) {
- /* Drivers usually send the scan code first, then the key code,
- * then a SYN. Some drivers (like thinkpad_acpi) send the key
- * code first, and some drivers might not send SYN events, so
- * keep a robust state machine which can deal with any of those
- */
-
- if (ev.type == EV_MSC && ev.code == MSC_SCAN) {
- if (has_scan) {
- fputs("driver did not send SYN event in between key events; previous event:\n",
- stderr);
- print_key(last_scan, last_key, has_scan, has_key);
- has_key = 0;
- }
-
- last_scan = ev.value;
- has_scan = 1;
- /*printf("--- got scan %u; has scan %i key %i\n", last_scan, has_scan, has_key); */
- }
- else if (ev.type == EV_KEY) {
- if (has_key) {
- fputs("driver did not send SYN event in between key events; previous event:\n",
- stderr);
- print_key(last_scan, last_key, has_scan, has_key);
- has_scan = 0;
- }
-
- last_key = ev.code;
- has_key = 1 + ev.value;
- /*printf("--- got key %hu; has scan %i key %i\n", last_key, has_scan, has_key);*/
-
- /* Stop on ESC */
- if (ev.code == KEY_ESC && ev.value == 0)
- break;
- }
- else if (ev.type == EV_SYN) {
- /*printf("--- got SYN; has scan %i key %i\n", has_scan, has_key);*/
- print_key(last_scan, last_key, has_scan, has_key);
-
- has_scan = has_key = 0;
- }
-
- }
-
- /* release input device */
- ioctl(fd, EVIOCGRAB, 0);
-}
-
-_noreturn_ static void help(int error)
-{
- const char* h = "Usage: keymap <event device> [<map file>]\n"
- " keymap <event device> scancode keyname [...]\n"
- " keymap -i <event device>\n";
- if (error) {
- fputs(h, stderr);
- exit(2);
- } else {
- fputs(h, stdout);
- exit(0);
- }
-}
-
-int main(int argc, char **argv)
-{
- static const struct option options[] = {
- { "help", no_argument, NULL, 'h' },
- { "interactive", no_argument, NULL, 'i' },
- {}
- };
- int fd = -1;
- int opt_interactive = 0;
- int i;
-
- while (1) {
- int option;
-
- option = getopt_long(argc, argv, "hi", options, NULL);
- if (option == -1)
- break;
-
- switch (option) {
- case 'h':
- help(0);
-
- case 'i':
- opt_interactive = 1;
- break;
- default:
- return 1;
- }
- }
-
- if (argc < optind+1)
- help (1);
-
- if ((fd = evdev_open(argv[optind])) < 0)
- return 3;
-
- /* one argument (device): dump or interactive */
- if (argc == optind+1) {
- if (opt_interactive)
- interactive(fd);
- else
- dump_table(fd);
- return 0;
- }
-
- /* two arguments (device, mapfile): set map file */
- if (argc == optind+2) {
- const char *filearg = argv[optind+1];
- if (strchr(filearg, '/')) {
- /* Keymap file argument is a path */
- FILE *f = fopen(filearg, "re");
- if (f)
- merge_table(fd, f);
- else
- perror(filearg);
- } else {
- /* Keymap file argument is a filename */
- /* Open override file if present, otherwise default file */
- char keymap_path[PATH_MAX];
- FILE *f;
-
- snprintf(keymap_path, sizeof(keymap_path), "/etc/udev/keymaps/%s", filearg);
- f = fopen(keymap_path, "re");
- if (f) {
- merge_table(fd, f);
- } else {
- snprintf(keymap_path, sizeof(keymap_path), UDEVLIBEXECDIR "/keymaps/%s", filearg);
- f = fopen(keymap_path, "re");
- if (f)
- merge_table(fd, f);
- else
- perror(keymap_path);
- }
- }
- return 0;
- }
-
- /* more arguments (device, scancode/keyname pairs): set keys directly */
- if ((argc - optind - 1) % 2 == 0) {
- for (i = optind+1; i < argc; i += 2)
- set_key(fd, argv[i], argv[i+1]);
- return 0;
- }
-
- /* invalid number of arguments */
- help(1);
- return 1; /* not reached */
-}