Wireless Touch Keyboard K410 not recognized due to assertion error
Created by: laanwj
Firstly: thanks for writing this software. Being able to toggle Fn key behavior makes my life with this keyboard lot easier.
There is a minor issue with the K410, causing its entry not to be added to the menu. I know it is not in the supported list so it may be expected. But the fun thing is that it is easy to bypass. The assertion in
assert self.device_kind is None or self.device_kind == device.kind
fails on a setting where self.device_kind
is mouse
and device.kind
is keyboard
. This device is a combined keyboard-trackpad.
Traceback:
Traceback (most recent call last):
File "/home/user/upstream/hw/Solaar/lib/logitech_receiver/listener.py", line 185, in run
self._notifications_callback(n)
File "/home/user/upstream/hw/Solaar/lib/solaar/listener.py", line 207, in _notifications_handler
_notifications.process(dev, n)
File "/home/user/upstream/hw/Solaar/lib/logitech_receiver/notifications.py", line 54, in process
return _process_device_notification(device, status, notification)
File "/home/user/upstream/hw/Solaar/lib/logitech_receiver/notifications.py", line 97, in _process_device_notification
return _process_hidpp10_notification(device, status, n)
File "/home/user/upstream/hw/Solaar/lib/logitech_receiver/notifications.py", line 174, in _process_hidpp10_notification
status.changed(active=link_established)
File "/home/user/upstream/hw/Solaar/lib/logitech_receiver/status.py", line 265, in changed
for s in d.settings:
File "/home/user/upstream/hw/Solaar/lib/logitech_receiver/receiver.py", line 254, in settings
_check_feature_settings(self, self._settings)
File "/home/user/upstream/hw/Solaar/lib/logitech_receiver/settings_templates.py", line 268, in check_feature_settings
check_feature(_SMOOTH_SCROLL[0], _F.HI_RES_SCROLLING)
File "/home/user/upstream/hw/Solaar/lib/logitech_receiver/settings_templates.py", line 266, in check_feature
already_known.append(feature(device))
File "/home/user/upstream/hw/Solaar/lib/logitech_receiver/settings.py", line 63, in __call__
assert self.device_kind is None or self.device_kind == device.kind
AssertionError
Commenting out the assertion makes it work perfectly, apart from identifying the device as a K400, but the fn switch works! Version: current master as of ddbc2748