Skip to content

Commit a689513

Browse files
committed
Add numeric keypad (universal)
1 parent 2943080 commit a689513

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Macropad_Hotkeys/macros/numpad.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# MACROPAD Hotkeys example: Safari web browser for Mac
2+
3+
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
4+
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Numpad', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
(0x004000, '1', ['1']),
11+
(0x004000, '2', ['2']),
12+
(0x400000, '3', ['3']),
13+
# 2nd row ----------
14+
(0x202000, '4', ['4']),
15+
(0x202000, '5', ['5']),
16+
(0x400000, '6', ['6']),
17+
# 3rd row ----------
18+
(0x000040, '7', ['7']),
19+
(0x000040, '8', ['8']),
20+
(0x000040, '9', ['9']),
21+
# 4th row ----------
22+
(0x000000, '*', ['*']),
23+
(0x800000, '0', ['0']),
24+
(0x101010, '#', ['#']),
25+
# Encoder button ---
26+
(0x000000, '', [Keycode.BACKSPACE])
27+
]
28+
}

0 commit comments

Comments
 (0)