Skip to content

Commit 627a187

Browse files
committed
Only reset if needed
Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 8963ff6 commit 627a187

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/qmk_hid/gui.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def get_numlock_state():
139139

140140
def update_type(t):
141141
types = {
142-
'ansi': [0x0012],
142+
'ansi': [0x0012, 0x0030],
143143
'copilot': [0x0012, 0x0030],
144144
'iso': [0x0018],
145145
'jis': [0x0019],
@@ -176,13 +176,14 @@ def update_type(t):
176176
print("More than 1 USB device with VID 32AC PID {:04X} found. Aborting".format(pid))
177177
break
178178

179+
print("Found USB device with VID 32AC PID {:04X} found".format(pid))
179180
print("Flashing firmware")
180181
flash_firmware(filtered_devs[0], firmware_path)
181182

182183
print("Waiting 10 seconds for the keyboard to restart")
183184
time.sleep(10)
184185

185-
if t == 'copilot':
186+
if t == 'copilot' and pid == 0x0012:
186187
print("Clearing keyboard settings for copilot keyboard")
187188
devices = find_devs(show=False, verbose=False)
188189
filtered_devs = [dev for dev in devices if dev['product_id'] == pid]

0 commit comments

Comments
 (0)