This is my code for the miniKbd, customized from the TwoEncoder-Multimode starter setup.
In mode 1, it controls macOS system music – play/pause, up/down volume, and skip/prev song.
In mode 2, it controls the Chrome extension Video Speed Controller – play/pause, skip forward/back by 5 seconds, and speed increase/decrease.
To avoid existing shortcut keys on Vimeo, I have separately configured the Video Speed Controller settings to use W
for decrease speed and E
for increase speed.
CIRCUITPY lib files required for this setup:
- lib
- adafruit_hid
- __init__.py
- consumer_control_code.mpy
- consumer_control.mpy
- keyboard_layout_us.mpy
- keyboard.mpy
- keycode.mpy
- adafruit_dotstar.mpy
- ._encoder.py
- ._main.py
...and the files inside this Gist. The most important one is main.py