|
1 | 1 | # Pico Macro keyboard (CircuitPython)
|
| 2 | +An easily reconfigurable macro keyboard that can press button combinations, like <kbd>ALT</kbd>+<kbd>Tab</kbd>. Suitable for using for shortcuts in a program, or for activating Auto-hotkey scripts. |
| 3 | + |
| 4 | +Built with the Raspberry Pi Pico and CircuitPython. |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +# Hardware |
| 9 | +* A Raspberry Pi Pico |
| 10 | +* Some keyboard switches (I used *Durock T1 67g Tactile*). |
| 11 | +* Key caps for the switches (I used *Tai-hao rubber keycaps*). |
| 12 | +* An enclosure (if you have access to a 3D printer - this design worked for me: [`novaspirit#4812223@thingiverse.com`](https://www.thingiverse.com/thing:4812223), when I printed the lid with a skirt for adhesion, which suppressed deformations) |
| 13 | + |
| 14 | +## Assembly |
| 15 | +See the [fritzing schematics](./doc/fritzing) on how to assemble the keyboard (very simple). |
| 16 | + |
| 17 | +# Software |
| 18 | +The microcontroller was programmed with CircuitPython 7.0.0-rc.1. |
2 | 19 |
|
3 | 20 | ## Installation
|
4 | 21 |
|
5 |
| -### Install CircuitPython 7+ on the Pico |
| 22 | +### Flashing CircuitPython 7+ on the Pico |
6 | 23 | * Download it from here: https://circuitpython.org/board/raspberry_pi_pico/
|
7 | 24 | * Hold the BOOTSEL button while plugging in the Pico.
|
8 | 25 | * Drop the CircuitPython.uf2 file in the Pico's CIRCUITPYTHON drive.
|
9 | 26 |
|
10 |
| -### Upload the code to the Pico |
11 |
| -* Clone submodules etc.: |
12 |
| - ```bash |
| 27 | +### Uploading the user code to the Pico |
| 28 | +* Initialize the code in this repository (clone submodules etc.): |
| 29 | + ```console |
13 | 30 | $ ./install.sh
|
14 | 31 | Cloning external submodules/libs
|
15 | 32 | Copying external libs into pico libs folder
|
16 | 33 | ```
|
17 |
| -* Copy all files from the [pico](./pico) folder to your CircuitPython drive. And voilà! |
| 34 | +* Copy all files from the [pico](./pico) folder to your CircuitPython drive. |
| 35 | +* Unplug the Pico from the USB port, and plug it in again. Voilà! |
18 | 36 |
|
19 |
| -## Usage |
20 |
| -* Add mappings to config.json for the pins to key combinations |
| 37 | +# Usage |
| 38 | +* Add mappings to config.json for the pins to key combinations. The file shall contain an array. Each element is an array of strings. Each string is the name of a key to press. The entry shall be null to leave the key unconfigured. E.g. |
| 39 | + ```json |
| 40 | + [ |
| 41 | + ["A"], // Key 1 presses a (note that it is just the key, not the upper case character) |
| 42 | + null, // Key 2 does not press any key combination |
| 43 | + ["ALT", "Tab"], // Key 3 pressed ALT+Tab |
| 44 | + // The rest of the keys are not configured |
| 45 | + ] |
| 46 | + ``` |
21 | 47 | * Hold down GP0 upon boot to enable only-keyboard mode
|
| 48 | +* If any key is held down during boot, then the program will exit (as a kill-switch in case there is a short) |
0 commit comments