mirror of
https://github.com/erjiang/huion-keys.git
synced 2026-03-23 13:44:52 +03:00
fix a potential bug if Dial section is not defined
This commit is contained in:
parent
c846460402
commit
d94e68cb73
@ -65,7 +65,7 @@ def main():
|
||||
if CYCLE_MODE > CYCLE_MODES:
|
||||
CYCLE_MODE = 1
|
||||
print("Cycling to mode %s" % (CYCLE_MODE,))
|
||||
elif btn in DIAL_MODES[CYCLE_MODE]:
|
||||
elif CYCLE_MODE in DIAL_MODES and btn in DIAL_MODES[CYCLE_MODE]:
|
||||
print("Sending %s from Mode %d" % (DIAL_MODES[CYCLE_MODE][btn], CYCLE_MODE),)
|
||||
lib.xdo_send_keysequence_window(
|
||||
xdo, lib.CURRENTWINDOW, DIAL_MODES[CYCLE_MODE][btn], 1000)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user