diff --git a/lib/logitech_receiver/descriptors.py b/lib/logitech_receiver/descriptors.py index 12f327ce..f154cc8a 100644 --- a/lib/logitech_receiver/descriptors.py +++ b/lib/logitech_receiver/descriptors.py @@ -167,6 +167,11 @@ _D('Wireless Keyboard K360', protocol=2.0, wpid='4004', _FS.fn_swap() ], ) +_D('Wireless Keyboard K375s', protocol=2.0, wpid='4061', + settings=[ + _FS.k375s_fn_swap() + ], + ) _D('Wireless Touch Keyboard K400', protocol=2.0, wpid=('400E', '4024'), settings=[ _FS.fn_swap() diff --git a/lib/logitech_receiver/hidpp20.py b/lib/logitech_receiver/hidpp20.py index 8b441b6f..2fa7e4df 100644 --- a/lib/logitech_receiver/hidpp20.py +++ b/lib/logitech_receiver/hidpp20.py @@ -81,6 +81,7 @@ FEATURE = _NamedInts( HYBRID_TRACKING=0x2400, FN_INVERSION=0x40A0, NEW_FN_INVERSION=0x40A2, + K375S_FN_INVERSION=0x40A3, ENCRYPTION=0x4100, LOCK_KEY_STATE=0x4220, SOLAR_DASHBOARD=0x4301, diff --git a/lib/logitech_receiver/settings_templates.py b/lib/logitech_receiver/settings_templates.py index 16ddb063..db49ae01 100644 --- a/lib/logitech_receiver/settings_templates.py +++ b/lib/logitech_receiver/settings_templates.py @@ -179,6 +179,11 @@ def _feature_new_fn_swap(): label=_FN_SWAP[1], description=_FN_SWAP[2], device_kind=_DK.keyboard) +def _feature_k375s_fn_swap(): + return feature_toggle(_FN_SWAP[0], _F.K375S_FN_INVERSION, + label=_FN_SWAP[1], description=_FN_SWAP[2], + device_kind=_DK.keyboard) + def _feature_smooth_scroll(): return feature_toggle(_SMOOTH_SCROLL[0], _F.HI_RES_SCROLLING, label=_SMOOTH_SCROLL[1], description=_SMOOTH_SCROLL[2], @@ -292,6 +297,7 @@ from collections import namedtuple _SETTINGS_LIST = namedtuple('_SETTINGS_LIST', [ 'fn_swap', 'new_fn_swap', + 'k375s_fn_swap', 'smooth_scroll', 'lowres_smooth_scroll', 'hires_smooth_invert', @@ -308,6 +314,7 @@ del namedtuple RegisterSettings = _SETTINGS_LIST( fn_swap=_register_fn_swap, new_fn_swap=None, + k375s_fn_swap=None, smooth_scroll=_register_smooth_scroll, lowres_smooth_scroll=None, hires_smooth_invert=None, @@ -322,6 +329,7 @@ RegisterSettings = _SETTINGS_LIST( FeatureSettings = _SETTINGS_LIST( fn_swap=_feature_fn_swap, new_fn_swap=_feature_new_fn_swap, + k375s_fn_swap=_feature_k375s_fn_swap, smooth_scroll=_feature_smooth_scroll, lowres_smooth_scroll=_feature_lowres_smooth_scroll, hires_smooth_invert=_feature_hires_smooth_invert, @@ -371,6 +379,7 @@ def check_feature_settings(device, already_known): check_feature(_HIRES_RES[0], _F.HIRES_WHEEL, "hires_smooth_resolution") check_feature(_FN_SWAP[0], _F.FN_INVERSION) check_feature(_FN_SWAP[0], _F.NEW_FN_INVERSION, 'new_fn_swap') + check_feature(_FN_SWAP[0], _F.K375S_FN_INVERSION, 'k375s_fn_swap') check_feature(_DPI[0], _F.ADJUSTABLE_DPI) check_feature(_POINTER_SPEED[0], _F.POINTER_SPEED) check_feature(_SMART_SHIFT[0], _F.SMART_SHIFT)