summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-03-09 10:30:40 -0500
committerGitHub <noreply@github.com>2017-03-09 10:30:40 -0500
commite5b5118d28de99dd7ad4caea5dfc7088cb0d0e81 (patch)
tree100a07296b690c2faf6e8e03b8d3788c29201c34
parent37377227ff47aa88c698c4b704d68d600d695c9f (diff)
parentb698b5cf8577d9538a6c87fbb582d34f97b3047b (diff)
Merge pull request #5560 from hadess/keyboard-leds
hwdb: Add property for keyboards without LEDs
-rw-r--r--hwdb/60-keyboard.hwdb39
-rwxr-xr-xhwdb/parse_hwdb.py2
2 files changed, 36 insertions, 5 deletions
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 1aa729f047..8cd727bb3e 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -1,7 +1,13 @@
# This file is part of systemd.
#
-# Keyboard mapping of scan codes to key codes, and
-# scan codes to add to the AT keyboard's 'force-release' list.
+# This file contains 2 types of metadata to apply to keyboards and
+# keyboard-like input devices:
+# - Key mapping
+# - Hard-coded layouts
+#
+# The matching process is the same for the different types of metadata.
+#
+# ########################### MATCHING #######################################
#
# The lookup keys are composed in:
# 60-evdev.rules
@@ -40,6 +46,12 @@
# /sys/class/input/input?/capabilities/ev" and <vendor> is the
# firmware-provided string exported by the kernel DMI modalias,
# see /sys/class/dmi/id/modalias
+
+
+# ######################### KEY MAPPING ######################################
+#
+# Keyboard mapping of scan codes to key codes, and
+# scan codes to add to the AT keyboard's 'force-release' list.
#
# Scan codes are specified as:
# KEYBOARD_KEY_<hex scan code>=<key code identifier>
@@ -1274,9 +1286,13 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDIXONSP:pnDIXON*:pvr*
KEYBOARD_KEY_ae=! # volume down
KEYBOARD_KEY_b0=! # volume up
-###########################################################
-# Fixed layout devices
-###########################################################
+######################### FIXED LAYOUT DEVICES #############################
+# This section lists devices for which only one keyboard layout is possible
+# or useful such as devices which "type" expecting the user's keymap to match
+# a particular one. For example, barcode readers and OTP keys.
+#
+# The layout must be an xkb compatible layout (defined with XKB_FIXED_LAYOUT),
+# with an accompanying variant (defined with XKB_FIXED_VARIANT) if necessary.
# Yubico Yubico Yubikey II"
evdev:input:b0003v1050p0010*
@@ -1288,3 +1304,16 @@ evdev:input:b0003v1050p0116*
evdev:input:b0003v05FEp1010*
XKB_FIXED_LAYOUT="us"
XKB_FIXED_VARIANT=""
+
+######################### LACK OF MODIFIER LEDS ############################
+# This section lists keyboard which do not have their own LEDs for some
+# modifiers. Only Caps-Lock (KEYBOARD_LED_CAPSLOCK) and Num-Lock
+# (KEYBOARD_LED_CAPSLOCK) are currently handled and need their values set
+# to "0" to indicate the absence of LED.
+#
+# Presence of a LED is implicit when the property is absent.
+
+# Logitech K750
+evdev:input:b0003v046Dp4002*
+ KEYBOARD_LED_NUMLOCK=0
+ KEYBOARD_LED_CAPSLOCK=0
diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py
index b57e6f75aa..e2c65c4be0 100755
--- a/hwdb/parse_hwdb.py
+++ b/hwdb/parse_hwdb.py
@@ -112,6 +112,8 @@ def property_grammar():
('ID_INPUT_TOUCHPAD_INTEGRATION', Or(('internal', 'external'))),
('XKB_FIXED_LAYOUT', STRING),
('XKB_FIXED_VARIANT', STRING),
+ ('KEYBOARD_LED_NUMLOCK', Literal('0')),
+ ('KEYBOARD_LED_CAPSLOCK', Literal('0')),
('ACCEL_MOUNT_MATRIX', mount_matrix),
)
fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE')