settings: allow unkonwn keys in Key rule conditions

This commit is contained in:
Peter F. Patel-Schneider 2024-08-23 13:29:32 -04:00
parent ae39ac46ba
commit fdd2c79950
1 changed files with 3 additions and 0 deletions

View File

@ -865,6 +865,9 @@ class Key(Condition):
if isinstance(key, str) and key in CONTROL: if isinstance(key, str) and key in CONTROL:
self.key = CONTROL[key] self.key = CONTROL[key]
elif isinstance(key, str) and key.startswith("unknown:"):
logger.info(f"rule Key key name currently unknown: {key}")
self.key = CONTROL[int(key[-4:], 16)]
else: else:
if warn: if warn:
logger.warning(f"rule Key key name not name of a Logitech key: {key}") logger.warning(f"rule Key key name not name of a Logitech key: {key}")