Skip to content

Instantly share code, notes, and snippets.

@hamishnorton
Created March 24, 2022 07:22
Show Gist options
  • Save hamishnorton/96beab1dddcb3a03431c4b90b94e9adc to your computer and use it in GitHub Desktop.
Save hamishnorton/96beab1dddcb3a03431c4b90b94e9adc to your computer and use it in GitHub Desktop.
Text Injection wtih a Adafruit MacroPad
# MACROPAD Hotkeys example: Text Injection
# https://learn.adafruit.com/macropad-hotkeys
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
# https://docs.circuitpython.org/projects/hid/en/latest/_modules/adafruit_hid/keycode.html
app = {
'name' : 'Injection', # Application name
'macros' : [ # List of button macros...
# COLOR LABEL KEY SEQUENCE
# 1st row ----------
(0x220000, 'first', '<yourFirstName>'),
(0x220000, 'surname', '<yourSurname>'),
(0x220000, 'full', '<yourFullName>'),
# 2nd row ----------
(0x000000, 'exIp', '1.1.1.1'),
(0x220000, 'Ip6WL', '1:1:1:1::/64'),
(0x000000, 'inIp', '192.168.1.1'),
# 3rd row ----------
(0x000000, '@...', '<emailAddress>'),
(0x220000, '@...', '<emailAddress>'),
(0x000000, '@work', '<emailAddress>'),
# 4th row ----------
(0x220000, '', ''),
(0x220000, '#-pre', '<phoneNumber'),
(0x220000, '#full', '+<prefix><phoneNumber>'),
# Encoder button ---
(0x000000, 'QL', [Keycode.ALT, 'Q'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment