28 lines
610 B
Python
Executable File
28 lines
610 B
Python
Executable File
import time
|
|
from adafruit_hid.keycode import Keycode
|
|
from KeyboardStateManager import KeyboardStateManager
|
|
|
|
pinout_rows = [
|
|
[7, 11, 15, 0],
|
|
[8, 4, 14, 1],
|
|
[6, 10, 13, 2],
|
|
[9, 5, 12, 3]
|
|
]
|
|
|
|
keymap_rows = [
|
|
[Keycode.ONE, Keycode.TWO, Keycode.THREE, Keycode.FOUR],
|
|
[Keycode.Q, Keycode.W, Keycode.E, Keycode.R],
|
|
[Keycode.A, Keycode.S, Keycode.D, Keycode.F],
|
|
[Keycode.Z, Keycode.X, Keycode.C, Keycode.LEFT_SHIFT],
|
|
]
|
|
|
|
|
|
# Sleep to avoid OS problems
|
|
time.sleep(1)
|
|
|
|
keyboard_state_manager = KeyboardStateManager(pinout_rows, keymap_rows)
|
|
|
|
|
|
while True:
|
|
keyboard_state_manager.loop()
|