scruss / KeySwitch

A low-cost AT Switch Interface based on the Adafruit Trinket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeySwitch

This is a simple AT Switch Interface based on the ATMakers PCB design and an AdaFruit Trinket M0

This allows keystrokes to be sent to a PC, MAC, or any USB HID central device based on the code and configuration files on the Trinket device itself.

This is a CircuitPython project and many thanks to Adafruit and its staff and community for their help.

Quick Installation

This version has all code sync'ed between the uf2 and library files, so installing the UF2 image will give all the files you need. See MODES to find out how to change operating mode.

Update KeySwitch code

Update uf2 bootloader

Update Software

  • Download the necessary files from KeySwitch github repository.
  1. Visit KeySwitch github repository at https://github.com/ATMakersOrg/KeySwitch
  2. Click on “Clone or download” button” in green.
  3. Click on “Download Zip” to download the necessary file.
  4. Extract “KeySwitch-master.zip” to the directory of your choice.
  • Drag and drop lib library files from extracted “KeySwitch-master” folder in lib file under CIRCUITPY drive.

  • The structure of lib directory:

  • lib

    • adafruit_dotstar.mpy
    • adafruit_hid
      • init.py
      • Keyboard.mpy
      • keyboard_layout_us.mpy
      • keycode.mpy
      • mouse.mpy
  • Drag and drop following files from extracted “KeySwitch-master” folder to CIRCUITPY drive:

    • main.py
    • mode.py
    • settings.py
    • README.md
  • You may need to press reset button to make it start functioning.

Modes

Press and hold switch 5 to switch modes.

Modes Switch actions Led Color
Scanning 1 ONE 2 TWO 3 THREE 4 FOUR 1,2 FIVE #0000FF (Blue)
Common 1 SPACE 2 ENTER 3 LEFT_CLICK 4 RIGHT_CLICK #FF0000
Mouse 1 MOUSE_LEFT 2 MOUSE_RIGHT 3 MOUSE_UP 4 MOUSE_DOWN #00FF00
Arrows 1 UP_ARROW 2 DOWN_ARROW 3 LEFT_ARROW 4 RIGHT_ARROW #FF00FF
Browser 1 SPACE 2 TAB 3 SHIFT+TAB 4 PAGE_DOWN #FFFF00

Change Modes and switches

  • settings.mpy file can be edited to change the modes and functionality of switches

About

A low-cost AT Switch Interface based on the Adafruit Trinket

License:MIT License


Languages

Language:Python 100.0%