-
Notifications
You must be signed in to change notification settings - Fork 803
Expand file tree
/
Copy pathlinux-firefox.py
More file actions
30 lines (28 loc) · 1.41 KB
/
linux-firefox.py
File metadata and controls
30 lines (28 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# MACROPAD Hotkeys example: Firefox web browser for Linux
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
app = { # REQUIRED dict, must be named 'app'
'name' : 'Linux Firefox', # Application name
'macros' : [ # List of button macros...
# COLOR LABEL KEY SEQUENCE
# 1st row ----------
(0x004000, '< Back', [Keycode.CONTROL, '[']),
(0x004000, 'Fwd >', [Keycode.CONTROL, ']']),
(0x400000, 'Up', [Keycode.SHIFT, ' ']), # Scroll up
# 2nd row ----------
(0x202000, '< Tab', [Keycode.CONTROL, Keycode.SHIFT, Keycode.TAB]),
(0x202000, 'Tab >', [Keycode.CONTROL, Keycode.TAB]),
(0x400000, 'Down', ' '), # Scroll down
# 3rd row ----------
(0x000040, 'Reload', [Keycode.CONTROL, 'r']),
(0x000040, 'Home', [Keycode.CONTROL, 'h']),
(0x000040, 'Private', [Keycode.CONTROL, Keycode.SHIFT, 'p']),
# 4th row ----------
(0x101010, 'Ada', [[Keycode.CONTROL, KEYCODE.N],
'www.adafruit.com\n']), # adafruit.com in a new tab
(0x000040, 'Dev Mode', [Keycode.F12]), # dev mode
(0x101010, 'Digi', [[Keycode.CONTROL, KEYCODE.N],
'digikey.com\n']), # digikey in a new tab
# Encoder button ---
(0x000000, '', [Keycode.CONTROL, 'w']) # Close window/tab
]
}