mirror of
https://github.com/erjiang/huion-keys.git
synced 2026-03-23 21:54:53 +03:00
check if Hold is in the config
This commit is contained in:
parent
d94e68cb73
commit
27a09fc650
@ -117,13 +117,14 @@ def read_config(config_file):
|
|||||||
else:
|
else:
|
||||||
print("[WARN] unrecognized regular binding '%s'" % (binding,))
|
print("[WARN] unrecognized regular binding '%s'" % (binding,))
|
||||||
#Same, but for buttons that should be held down
|
#Same, but for buttons that should be held down
|
||||||
for binding in CONFIG['Hold']:
|
if 'Hold' in CONFIG:
|
||||||
if binding.isdigit():
|
for binding in CONFIG['Hold']:
|
||||||
BUTTON_BINDINGS_HOLD[int(binding)] = CONFIG['Hold'][binding].encode('utf-8')
|
if binding.isdigit():
|
||||||
elif binding == '':
|
BUTTON_BINDINGS_HOLD[int(binding)] = CONFIG['Hold'][binding].encode('utf-8')
|
||||||
continue
|
elif binding == '':
|
||||||
else:
|
continue
|
||||||
print ("[WARN] unrecognized hold binding '%s'" % (binding,))
|
else:
|
||||||
|
print ("[WARN] unrecognized hold binding '%s'" % (binding,))
|
||||||
# Assume that if cycle is assigned we have modes for now
|
# Assume that if cycle is assigned we have modes for now
|
||||||
if 'Dial' in CONFIG:
|
if 'Dial' in CONFIG:
|
||||||
CYCLE_BUTTON = int(CONFIG['Dial']['cycle'])
|
CYCLE_BUTTON = int(CONFIG['Dial']['cycle'])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user