|
| 1 | +# MACROPAD Hotkeys example: Firefox web browser for Linux |
| 2 | + |
| 3 | +from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values |
| 4 | + |
| 5 | +app = { # REQUIRED dict, must be named 'app' |
| 6 | + 'name' : 'Linux Firefox', # Application name |
| 7 | + 'macros' : [ # List of button macros... |
| 8 | + # COLOR LABEL KEY SEQUENCE |
| 9 | + # 1st row ---------- |
| 10 | + (0x004000, '< Back', [Keycode.CONTROL, '[']), |
| 11 | + (0x004000, 'Fwd >', [Keycode.CONTROL, ']']), |
| 12 | + (0x400000, 'Up', [Keycode.SHIFT, ' ']), # Scroll up |
| 13 | + # 2nd row ---------- |
| 14 | + (0x202000, '< Tab', [Keycode.CONTROL, Keycode.SHIFT, Keycode.TAB]), |
| 15 | + (0x202000, 'Tab >', [Keycode.CONTROL, Keycode.TAB]), |
| 16 | + (0x400000, 'Down', ' '), # Scroll down |
| 17 | + # 3rd row ---------- |
| 18 | + (0x000040, 'Reload', [Keycode.CONTROL, 'r']), |
| 19 | + (0x000040, 'Home', [Keycode.CONTROL, 'h']), |
| 20 | + (0x000040, 'Private', [Keycode.CONTROL, Keycode.SHIFT, 'p']), |
| 21 | + # 4th row ---------- |
| 22 | + (0x101010, 'Ada', [Keycode.CONTROL, 't', -Keycode.CONTROL, |
| 23 | + 'www.adafruit.com\n']), # adafruit.com in a new tab |
| 24 | + (0x000040, 'Dev Mode', [Keycode.F12]), # dev mode |
| 25 | + (0x101010, 'Digi', [Keycode.CONTROL, 't', -Keycode.CONTROL, |
| 26 | + 'digikey.com\n']), # digikey in a new tab |
| 27 | + # Encoder button --- |
| 28 | + (0x000000, '', [Keycode.CONTROL, 'w']) # Close window/tab |
| 29 | + ] |
| 30 | +} |
0 commit comments