device: fix no-output values for persistent key mappings
This commit is contained in:
parent
34685852aa
commit
2658fbba5a
|
@ -729,7 +729,7 @@ class KeysArrayPersistent(KeysArray):
|
|||
elif actionId == special_keys.ACTIONID.Consumer:
|
||||
remapped = special_keys.HID_CONSUMERCODES[remapped]
|
||||
elif actionId == special_keys.ACTIONID.Empty: # purge data from empty value
|
||||
remapped = modifiers = status = 0
|
||||
remapped = modifiers = 0
|
||||
self.keys[index] = PersistentRemappableAction(self.device, index, key, actionId, remapped, modifiers, status)
|
||||
elif _log.isEnabledFor(_WARNING):
|
||||
_log.warn(f"Key with index {index} was expected to exist but device doesn't report it.")
|
||||
|
|
|
@ -758,6 +758,7 @@ USB_HID_KEYCODES = _NamedInts(
|
|||
MEDIA_REFRESH=0xfa,
|
||||
MEDIA_CALC=0xfb,
|
||||
)
|
||||
USB_HID_KEYCODES[0] = 'No Output'
|
||||
USB_HID_KEYCODES[0x1e] = '1'
|
||||
USB_HID_KEYCODES[0x1f] = '2'
|
||||
USB_HID_KEYCODES[0x20] = '3'
|
||||
|
@ -1237,7 +1238,7 @@ for code in HORIZONTAL_SCROLL:
|
|||
def persistent_keys(action_ids):
|
||||
keys = _UnsortedNamedInts()
|
||||
keys[KEYS_Default] = 'Default' # Value to reset to default
|
||||
keys[0] = 'None' # Value for no output
|
||||
keys[0] = 'No Output (only as default)'
|
||||
for key in KEYS:
|
||||
if (int(key) >> 24) in action_ids:
|
||||
keys[int(key)] = str(key)
|
||||
|
|
Loading…
Reference in New Issue