Add ALT keys for rot enc

This commit is contained in:
ABelliqueux 2025-03-01 19:34:42 +01:00
parent 3cadd95e65
commit 027c075be5
1 changed files with 8 additions and 2 deletions

10
code.py
View File

@ -104,8 +104,14 @@ while True:
ALT = False
pos = enc.position
if pos > last_pos:
keyboard.send(rot_right)
if ALT:
keyboard.send(Keycode.LEFT_SHIFT, rot_right)
else:
keyboard.send(rot_right)
elif pos < last_pos:
keyboard.send(rot_left)
if ALT:
keyboard.send(Keycode.LEFT_SHIFT, rot_left)
else:
keyboard.send(rot_left)
last_pos = pos
time.sleep(btn_scan_delay)