From b698b5cf8577d9538a6c87fbb582d34f97b3047b Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 9 Mar 2017 14:53:52 +0100 Subject: [PATCH] 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 --- hwdb/60-keyboard.hwdb | 13 +++++++++++++ hwdb/parse_hwdb.py | 2 ++ 2 files changed, 15 insertions(+) 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')