From ad0d9c0109d45c12c6517684d84ea033cf8d54a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Daase?= Date: Fri, 8 Jan 2021 10:32:36 +0100 Subject: [PATCH 1/2] hwdb: Relax parsing script to allow 0 and 1 for all ID_* properties --- hwdb.d/parse_hwdb.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py index d1ff4470de1..d76a290f73e 100755 --- a/hwdb.d/parse_hwdb.py +++ b/hwdb.d/parse_hwdb.py @@ -127,20 +127,20 @@ def property_grammar(): ('MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL', INTEGER), ('MOUSE_WHEEL_CLICK_COUNT', INTEGER), ('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER), - ('ID_AUTOSUSPEND', Literal('1')), - ('ID_INPUT', Literal('1')), - ('ID_INPUT_ACCELEROMETER', Literal('1')), - ('ID_INPUT_JOYSTICK', Literal('1')), - ('ID_INPUT_KEY', Literal('1')), - ('ID_INPUT_KEYBOARD', Literal('1')), - ('ID_INPUT_MOUSE', Literal('1')), - ('ID_INPUT_POINTINGSTICK', Literal('1')), - ('ID_INPUT_SWITCH', Literal('1')), - ('ID_INPUT_TABLET', Literal('1')), - ('ID_INPUT_TABLET_PAD', Literal('1')), - ('ID_INPUT_TOUCHPAD', Literal('1')), - ('ID_INPUT_TOUCHSCREEN', Literal('1')), - ('ID_INPUT_TRACKBALL', Literal('1')), + ('ID_AUTOSUSPEND', Or((Literal('0'), Literal('1')))), + ('ID_INPUT', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_ACCELEROMETER', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_JOYSTICK', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_KEY', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_KEYBOARD', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_MOUSE', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_POINTINGSTICK', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_SWITCH', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_TABLET', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_TABLET_PAD', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_TOUCHPAD', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_TOUCHSCREEN', Or((Literal('0'), Literal('1')))), + ('ID_INPUT_TRACKBALL', Or((Literal('0'), Literal('1')))), ('POINTINGSTICK_SENSITIVITY', INTEGER), ('POINTINGSTICK_CONST_ACCEL', REAL), ('ID_INPUT_JOYSTICK_INTEGRATION', Or(('internal', 'external'))), From e056f9d2a3b1c8cf8ee360ad2ecf62818104a40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Daase?= Date: Thu, 7 Jan 2021 09:14:16 +0100 Subject: [PATCH 2/2] hwdb: Force no "mouse" type on Logitech MX Keys Fixes https://gitlab.freedesktop.org/upower/upower/-/issues/128 --- hwdb.d/60-input-id.hwdb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hwdb.d/60-input-id.hwdb b/hwdb.d/60-input-id.hwdb index 1eec776885b..2b1aa4579ad 100644 --- a/hwdb.d/60-input-id.hwdb +++ b/hwdb.d/60-input-id.hwdb @@ -72,3 +72,7 @@ id-input:modalias:input:b0003v04B3p301Ee0100-e0,1,2,4* # Logitech Ultrathin Touch Mouse id-input:modalias:input:b0005v046DpB00De0700* ID_INPUT_MOUSE=1 + +# Logitech MX Keys +id-input:modalias:input:b0003v046Dp408Ae0111* + ID_INPUT_MOUSE=0