settings: handle null key in persistent remappable actions when device does not respond

This commit is contained in:
Peter F. Patel-Schneider 2022-05-28 10:06:14 -04:00
parent 42faf0c3a0
commit 0d248c02ba
1 changed files with 3 additions and 2 deletions

View File

@ -1140,8 +1140,9 @@ class PersistentRemappableAction(_Settings):
return None
choices = {}
for k in remap_keys:
key = _special_keys.CONTROL[k.key]
choices[key] = keys # TO RECOVER FROM BAD VALUES use _special_keys.KEYS
if k is not None:
key = _special_keys.CONTROL[k.key]
choices[key] = keys # TO RECOVER FROM BAD VALUES use _special_keys.KEYS
return cls(choices, key_byte_count=2, byte_count=4) if choices else None