Files
macropad/code.py
2022-01-02 18:23:10 +01:00

21 lines
485 B
Python
Executable File

import time
from adafruit_hid.keycode import Keycode
from KeyboardStateManager import KeyboardStateManager
keymap_rows = [
[Keycode.ONE, Keycode.TWO, Keycode.THREE, Keycode.A],
[Keycode.Q, Keycode.W, Keycode.E, Keycode.R],
[Keycode.A, Keycode.S, Keycode.D, Keycode.F],
[Keycode.Z, Keycode.X, Keycode.C, 0x2000],
]
# Sleep to avoid OS problems
time.sleep(1)
keyboard_state_manager = KeyboardStateManager(keymap_rows)
while True:
keyboard_state_manager.start()