Skip to content

Commit be5c21f

Browse files
Merge pull request #1641 from PaintYourDragon/main
Add starter examples for Windows, distinguish Mac/Win in title
2 parents 1466c22 + 9f4911d commit be5c21f

6 files changed

Lines changed: 97 additions & 9 deletions

File tree

Macropad_Hotkeys/macros/mac-adobe-illustrator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
44

5-
app = { # REQUIRED dict, must be named 'app'
6-
'name' : 'Illustrator', # Application name
7-
'macros' : [ # List of button macros...
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Mac Illustrator', # Application name
7+
'macros' : [ # List of button macros...
88
# COLOR LABEL KEY SEQUENCE
99
# 1st row ----------
1010
(0x004000, 'Undo', [Keycode.COMMAND, 'z']),

Macropad_Hotkeys/macros/mac-adobe-photoshop.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
44

5-
app = { # REQUIRED dict, must be named 'app'
6-
'name' : 'Photoshop', # Application name
7-
'macros' : [ # List of button macros...
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Mac Photoshop', # Application name
7+
'macros' : [ # List of button macros...
88
# COLOR LABEL KEY SEQUENCE
99
# 1st row ----------
1010
(0x004000, 'Undo', [Keycode.COMMAND, 'z']),

Macropad_Hotkeys/macros/mac-safari.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
44

5-
app = { # REQUIRED dict, must be named 'app'
6-
'name' : 'Safari', # Application name
7-
'macros' : [ # List of button macros...
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Mac Safari', # Application name
7+
'macros' : [ # List of button macros...
88
# COLOR LABEL KEY SEQUENCE
99
# 1st row ----------
1010
(0x004000, '< Back', [Keycode.COMMAND, '[']),
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# MACROPAD Hotkeys example: Adobe Illustrator 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' : 'Win Illustrator', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
(0x004000, 'Undo', [Keycode.CONTROL, 'z']),
11+
(0x004000, 'Redo', [Keycode.CONTROL, 'Z']),
12+
(0x303000, 'Pen', 'p'), # Path-drawing tool
13+
# 2nd row ----------
14+
15+
(0x101010, 'Select', 'v'), # Select (path)
16+
(0x400000, 'Reflect', 'o'), # Reflect selection
17+
(0x303000, 'Rect', 'm'), # Draw rectangle
18+
# 3rd row ----------
19+
(0x101010, 'Direct', 'a'), # Direct (point) selection
20+
(0x400000, 'Rotate', 'r'), # Rotate selection
21+
(0x303000, 'Oval', 'l'), # Draw ellipse
22+
# 4th row ----------
23+
(0x101010, 'Eyedrop', 'i'), # Cycle eyedropper/measure modes
24+
(0x400000, 'Scale', 's'), # Scale selection
25+
(0x303000, 'Text', 't'), # Type tool
26+
# Encoder button ---
27+
(0x000000, '', [Keycode.CONTROL, Keycode.ALT, 'S']) # Save for web
28+
]
29+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# MACROPAD Hotkeys example: Adobe Photoshop 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' : 'Win Photoshop', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
(0x004000, 'Undo', [Keycode.CONTROL, 'z']),
11+
(0x004000, 'Redo', [Keycode.CONTROL, 'Z']),
12+
(0x000040, 'Brush', 'B'), # Cycle brush modes
13+
# 2nd row ----------
14+
(0x101010, 'B&W', 'd'), # Default colors
15+
(0x101010, 'Marquee', 'M'), # Cycle rect/ellipse marquee (select)
16+
(0x000040, 'Eraser', 'E'), # Cycle eraser modes
17+
# 3rd row ----------
18+
(0x101010, 'Swap', 'x'), # Swap foreground/background colors
19+
(0x101010, 'Move', 'v'), # Move layer
20+
(0x000040, 'Fill', 'G'), # Cycle fill/gradient modes
21+
# 4th row ----------
22+
(0x101010, 'Eyedrop', 'I'), # Cycle eyedropper/measure modes
23+
(0x101010, 'Wand', 'W'), # Cycle "magic wand" (selection) modes
24+
(0x000040, 'Heal', 'J'), # Cycle "healing" modes
25+
# Encoder button ---
26+
(0x000000, '', [Keycode.CONTROL, Keycode.ALT, 'S']) # Save for web
27+
]
28+
}
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' : 'Windows 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)