Skip to content

Commit f64ba20

Browse files
Add macros for Microsoft Edge browser (Windows)
1 parent 2c72bc5 commit f64ba20

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# MACROPAD Hotkeys example: Microsoft Edge web browser for Windows
2+
3+
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
4+
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Edge', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
(0x004000, '< Back', [Keycode.ALT, Keycode.LEFT_ARROW]),
11+
(0x004000, 'Fwd >', [Keycode.ALT, Keycode.RIGHT_ARROW]),
12+
(0x400000, 'Up', [Keycode.SHIFT, ' ']), # Scroll up
13+
# 2nd row ----------
14+
(0x202000, '- Size', [Keycode.CONTROL, Keycode.KEYPAD_MINUS]),
15+
(0x202000, 'Size +', [Keycode.CONTROL, Keycode.KEYPAD_PLUS]),
16+
(0x400000, 'Down', ' '), # Scroll down
17+
# 3rd row ----------
18+
(0x000040, 'Reload', [Keycode.CONTROL, 'r']),
19+
(0x000040, 'Home', [Keycode.ALT, Keycode.HOME]),
20+
(0x000040, 'Private', [Keycode.CONTROL, 'N']),
21+
# 4th row ----------
22+
(0x000000, 'Ada', [Keycode.CONTROL, 'n', -Keycode.COMMAND,
23+
'www.adafruit.com\n']), # Adafruit in new window
24+
(0x800000, 'Digi', [Keycode.CONTROL, 'n', -Keycode.COMMAND,
25+
'www.digikey.com\n']), # Digi-Key in new window
26+
(0x101010, 'Hacks', [Keycode.CONTROL, 'n', -Keycode.COMMAND,
27+
'www.hackaday.com\n']), # Hack-a-Day in new win
28+
# Encoder button ---
29+
(0x000000, '', [Keycode.CONTROL, 'w']) # Close tab
30+
]
31+
}

0 commit comments

Comments
 (0)