summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2017-03-09 14:53:52 +0100
committerBastien Nocera <hadess@hadess.net>2017-03-09 14:53:52 +0100
commitb698b5cf8577d9538a6c87fbb582d34f97b3047b (patch)
tree100a07296b690c2faf6e8e03b8d3788c29201c34
parent6a36cfec4af00d65e8ee88e1a1978e873b5c0c3c (diff)
hwdb: Add property for keyboards without LEDs
It is useful for desktop environments to be able to show Caps-Lock or Num-Lock status changes as an on-screen display when using a keyboard that doesn't have LEDs for this. Closes: #5559
-rw-r--r--hwdb/60-keyboard.hwdb13
-rwxr-xr-xhwdb/parse_hwdb.py2
2 files changed, 15 insertions, 0 deletions
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 1dccbec3cc..8cd727bb3e 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -1304,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')