]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hwdb: Add property for keyboards without LEDs 5560/head
authorBastien Nocera <hadess@hadess.net>
Thu, 9 Mar 2017 13:53:52 +0000 (14:53 +0100)
committerBastien Nocera <hadess@hadess.net>
Thu, 9 Mar 2017 13:53:52 +0000 (14:53 +0100)
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
hwdb/60-keyboard.hwdb
hwdb/parse_hwdb.py

index 1dccbec3cc67a5acd708f07dfccb35a8d50d2473..8cd727bb3e587504ee51deb0686597888496b02f 100644 (file)
@@ -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
index b57e6f75aa2160ab58601e3b22a732b2df308ada..e2c65c4be0754746c79d4204133eb4070e6c61dd 100755 (executable)
@@ -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')