Skip to content

Commit 1466c22

Browse files
authored
Merge pull request #1640 from isaacwellish/macropad-olympic-hotkeys
Macropad Olympic Hotkeys Macros code
2 parents 545d3ca + d2031c7 commit 1466c22

5 files changed

Lines changed: 254 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# MACROPAD Olympic Hotkeys main page
2+
3+
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
4+
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Olympics Home', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
(0x004000, '< Tab', [Keycode.CONTROL, Keycode.SHIFT, Keycode.TAB]),
11+
(0x004000, 'Tab >', [Keycode.CONTROL, Keycode.TAB]),
12+
(0x400000, 'Up', [Keycode.SHIFT, ' ']), # Scroll up
13+
# 2nd row ----------
14+
# Full schedule in new tab
15+
(0x3F3F3F, 'Sched', [Keycode.COMMAND, 't', -Keycode.COMMAND,
16+
'https://olympics.com/tokyo-2020/olympic-games/en/\
17+
results/all-sports/olympic-schedule.htm\n']),
18+
# Medal standings in new tab
19+
(0x404000 , 'Medals', [Keycode.COMMAND, 't', -Keycode.COMMAND,
20+
'https://olympics.com/tokyo-2020/olympic-games/en/\
21+
results/all-sports/medal-standings.htm\n']),
22+
(0x400000, 'Down', ' '), # Scroll down
23+
# 3rd row ----------
24+
# Peacock streaming service Olympics home in new tab
25+
(0x000040, 'PC', [Keycode.COMMAND, 't', -Keycode.COMMAND,
26+
'https://www.peacocktv.com/watch/\
27+
2020-tokyo-olympics\n']),
28+
# Full schedule in new tab
29+
(0x000040, 'NBC', [Keycode.COMMAND, 't', -Keycode.COMMAND,
30+
'https://www.usanetwork.com/live?brand=cnbc&callsign=nbc\n']),
31+
# Medal standings in new tab
32+
(0x000040 , 'YT', [Keycode.COMMAND, 't', -Keycode.COMMAND,
33+
'https://www.youtube.com/channel/UCTl3QQTvqHFjurroKxexy2Q\n']),
34+
# 4th row ----------
35+
# NBC in new tab
36+
(0x000040, 'CNBC', [Keycode.COMMAND, 't', -Keycode.COMMAND,
37+
'https://www.usanetwork.com/live?brand=nbc&callsign=cnbc\n']),
38+
# USA in new tab
39+
(0x000040, 'USA', [Keycode.COMMAND, 't', -Keycode.COMMAND,
40+
'https://www.usanetwork.com/live?brand=usa&callsign=usa_east\n']),
41+
# NBCSN in new tab
42+
(0x000040, 'NBCSN', [Keycode.COMMAND, 't', -Keycode.COMMAND,
43+
'https://www.usanetwork.com/live?brand=nbc-sports&callsign=nbcsn\n']),
44+
# Encoder button ---
45+
(0x000000, '', [Keycode.COMMAND, 'w']) # Close window/tab
46+
]
47+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# MACROPAD Olympic Hotkeys sports page 1
2+
3+
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
4+
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Sports 1', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
# 3x3 basketball schedule and results in new tab
11+
(0x000040, '3x3Bask', [Keycode.COMMAND, 't', -Keycode.COMMAND,
12+
'https://olympics.com/tokyo-2020/olympic-games/en/\
13+
results/3x3-basketball/olympic-schedule-and-results.htm\n']),
14+
(0x3F3F3F, 'Arch', [Keycode.COMMAND, 't', -Keycode.COMMAND,
15+
'https://olympics.com/tokyo-2020/olympic-games/en/\
16+
results/archery/olympic-schedule-and-results.htm\n']),
17+
(0x000040 , 'ArtGym', [Keycode.COMMAND, 't', -Keycode.COMMAND,
18+
'https://olympics.com/tokyo-2020/olympic-games/en/\
19+
results/artistic-gymnastics/olympic-schedule-and-results.htm\n']),
20+
# 2nd row ----------
21+
(0x3F3F3F, 'ArtSwim', [Keycode.COMMAND, 't', -Keycode.COMMAND,
22+
'https://olympics.com/tokyo-2020/olympic-games/en/r\
23+
esults/artistic-swimming/olympic-schedule-and-results.htm\n']),
24+
(0x404000, 'Athl', [Keycode.COMMAND, 't', -Keycode.COMMAND,
25+
'https://olympics.com/tokyo-2020/olympic-games/en/\
26+
results/athletics/olympic-schedule-and-results.htm\n']),
27+
(0x3F3F3F , 'Bdmntn', [Keycode.COMMAND, 't', -Keycode.COMMAND,
28+
'https://olympics.com/tokyo-2020/olympic-games/en/\
29+
results/badminton/olympic-schedule-and-results.htm\n']),
30+
# 3rd row ----------
31+
(0x404000, 'BB/SB', [Keycode.COMMAND, 't', -Keycode.COMMAND,
32+
'https://olympics.com/tokyo-2020/olympic-games/en/\
33+
results/baseball-softball/olympic-schedule-and-results.htm\n']),
34+
(0x3F3F3F, 'BaskBl', [Keycode.COMMAND, 't', -Keycode.COMMAND,
35+
'https://olympics.com/tokyo-2020/olympic-games/en/\
36+
results/basketball/olympic-schedule-and-results.htm\n']),
37+
(0x004000 , 'BVoll', [Keycode.COMMAND, 't', -Keycode.COMMAND,
38+
'https://olympics.com/tokyo-2020/olympic-games/en/\
39+
results/beach-volleyball/olympic-schedule-and-results.htm\n']),
40+
# 4th row ----------
41+
(0x3F3F3F, 'Boxing', [Keycode.COMMAND, 't', -Keycode.COMMAND,
42+
'https://olympics.com/tokyo-2020/olympic-games/en/\
43+
results/boxing/olympic-schedule-and-results.htm\n']),
44+
(0x004000, 'CanoeSl', [Keycode.COMMAND, 't', -Keycode.COMMAND,
45+
'https://olympics.com/tokyo-2020/olympic-games/en/\
46+
results/canoe-slalom/olympic-schedule-and-results.htm\n']),
47+
(0x3F3F3F, 'CanoeSp', [Keycode.COMMAND, 't', -Keycode.COMMAND,
48+
'https://olympics.com/tokyo-2020/olympic-games/en/\
49+
results/canoe-sprint/olympic-schedule-and-results.htm \n']),
50+
# Encoder button ---
51+
(0x000000, '', [Keycode.COMMAND, 'w']) # Close window/tab
52+
]
53+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# MACROPAD Olympic Hotkeys sports page 2
2+
3+
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
4+
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Sports 2', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
(0x3F3F3F, 'BMX Fr', [Keycode.COMMAND, 't', -Keycode.COMMAND,
11+
'https://olympics.com/tokyo-2020/olympic-games/en/\
12+
results/cycling-bmx-freestyle/olympic-schedule-and-results.htm\n']),
13+
(0x400000, 'BMX Ra', [Keycode.COMMAND, 't', -Keycode.COMMAND,
14+
'https://olympics.com/tokyo-2020/olympic-games/en/\
15+
results/cycling-bmx-racing/olympic-schedule-and-results.htm\n']),
16+
(0x3F3F3F , 'Mtn Bk', [Keycode.COMMAND, 't', -Keycode.COMMAND,
17+
'https://olympics.com/tokyo-2020/olympic-games/en/\
18+
results/cycling-mountain-bike/olympic-schedule-and-results.htm\n']),
19+
# 2nd row ----------
20+
(0x400000, 'Cyc Rd', [Keycode.COMMAND, 't', -Keycode.COMMAND,
21+
'https://olympics.com/tokyo-2020/olympic-games/en/\
22+
results/cycling-road/olympic-schedule-and-results.htm\n']),
23+
(0x3F3F3F, 'Cyc Tr', [Keycode.COMMAND, 't', -Keycode.COMMAND,
24+
'https://olympics.com/tokyo-2020/olympic-games/en/\
25+
results/cycling-track/olympic-schedule-and-results.htm\n']),
26+
(0x000040 , 'Dive', [Keycode.COMMAND, 't', -Keycode.COMMAND,
27+
'https://olympics.com/tokyo-2020/olympic-games/en/\
28+
results/diving/olympic-schedule-and-results.htm\n']),
29+
# 3rd row ----------
30+
(0x3F3F3F, 'Equest', [Keycode.COMMAND, 't', -Keycode.COMMAND,
31+
'https://olympics.com/tokyo-2020/olympic-games/en/\
32+
results/equestrian/olympic-schedule-and-results.htm\n']),
33+
(0x000040, 'Fence', [Keycode.COMMAND, 't', -Keycode.COMMAND,
34+
'https://olympics.com/tokyo-2020/olympic-games/en/\
35+
results/fencing/olympic-schedule-and-results.htm\n']),
36+
(0x3F3F3F , 'Fball', [Keycode.COMMAND, 't', -Keycode.COMMAND,
37+
'https://olympics.com/tokyo-2020/olympic-games/en/\
38+
results/football/olympic-schedule-and-results.htm\n']),
39+
# 4th row ----------
40+
(0x404000, 'Golf', [Keycode.COMMAND, 't', -Keycode.COMMAND,
41+
'https://olympics.com/tokyo-2020/olympic-games/en/\
42+
results/golf/olympic-schedule-and-results.htm\n']),
43+
(0x3F3F3F, 'Hball', [Keycode.COMMAND, 't', -Keycode.COMMAND,
44+
'https://olympics.com/tokyo-2020/olympic-games/en/\
45+
results/handball/olympic-schedule-and-results.htm\n']),
46+
(0x404000, 'Hockey', [Keycode.COMMAND, 't', -Keycode.COMMAND,
47+
'https://olympics.com/tokyo-2020/olympic-games/en/\
48+
results/hockey/olympic-schedule-and-results.htm \n']),
49+
# Encoder button ---
50+
(0x000000, '', [Keycode.COMMAND, 'w']) # Close window/tab
51+
]
52+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# MACROPAD Olympic Hotkeys sports page 3
2+
3+
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
4+
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Sports 3', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
(0x004000, 'Judo', [Keycode.COMMAND, 't', -Keycode.COMMAND,
11+
'https://olympics.com/tokyo-2020/olympic-games/en/\
12+
results/judo/olympic-schedule-and-results.htm\n']),
13+
(0x3F3F3F, 'Karate', [Keycode.COMMAND, 't', -Keycode.COMMAND,
14+
'https://olympics.com/tokyo-2020/olympic-games/en/\
15+
results/karate/olympic-schedule-and-results.htm\n']),
16+
(0x004000 , 'MSwim', [Keycode.COMMAND, 't', -Keycode.COMMAND,
17+
'https://olympics.com/tokyo-2020/olympic-games/en/\
18+
results/marathon-swimming/olympic-schedule-and-results.htm\n']),
19+
# 2nd row ----------
20+
(0x3F3F3F, 'Pentath', [Keycode.COMMAND, 't', -Keycode.COMMAND,
21+
'https://olympics.com/tokyo-2020/olympic-games/en/\
22+
results/modern-pentathlon/olympic-schedule-and-results.htm\n']),
23+
(0x400000, 'RGym', [Keycode.COMMAND, 't', -Keycode.COMMAND,
24+
'https://olympics.com/tokyo-2020/olympic-games/en/\
25+
results/rhythmic-gymnastics/olympic-schedule-and-results.htm\n']),
26+
(0x3F3F3F , 'Row', [Keycode.COMMAND, 't', -Keycode.COMMAND,
27+
'https://olympics.com/tokyo-2020/olympic-games/en/\
28+
results/rowing/olympic-schedule-and-results.htm\n']),
29+
# 3rd row ----------
30+
(0x400000, 'Rugby', [Keycode.COMMAND, 't', -Keycode.COMMAND,
31+
'https://olympics.com/tokyo-2020/olympic-games/en/\
32+
results/rugby-sevens/olympic-schedule-and-results.htm\n']),
33+
(0x3F3F3F, 'Sail', [Keycode.COMMAND, 't', -Keycode.COMMAND,
34+
'https://olympics.com/tokyo-2020/olympic-games/en/\
35+
results/sailing/olympic-schedule-and-results.htm\n']),
36+
(0x000040, 'Shoot', [Keycode.COMMAND, 't', -Keycode.COMMAND,
37+
'https://olympics.com/tokyo-2020/olympic-games/en/\
38+
results/shooting/olympic-schedule-and-results.htm\n']),
39+
# 4th row ----------
40+
(0x3F3F3F, 'Skate', [Keycode.COMMAND, 't', -Keycode.COMMAND,
41+
'https://olympics.com/tokyo-2020/olympic-games/en/\
42+
results/skateboarding/olympic-schedule-and-results.htm\n']),
43+
(0x000040, 'Climb', [Keycode.COMMAND, 't', -Keycode.COMMAND,
44+
'https://olympics.com/tokyo-2020/olympic-games/en/\
45+
results/sport-climbing/olympic-schedule-and-results.htm\n']),
46+
(0x3F3F3F, 'Surf', [Keycode.COMMAND, 't', -Keycode.COMMAND,
47+
'https://olympics.com/tokyo-2020/olympic-games/en/\
48+
results/surfing/olympic-schedule-and-results.htm \n']),
49+
# Encoder button ---
50+
(0x000000, '', [Keycode.COMMAND, 'w']) # Close window/tab
51+
]
52+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# MACROPAD Olympic Hotkeys sports page 4
2+
3+
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
4+
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : 'Sports 4', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
(0x3F3F3F, 'Swim', [Keycode.COMMAND, 't', -Keycode.COMMAND,
11+
'https://olympics.com/tokyo-2020/olympic-games/en/\
12+
results/swimming/olympic-schedule-and-results.htm\n']),
13+
(0x404000, 'TTennis', [Keycode.COMMAND, 't', -Keycode.COMMAND,
14+
'https://olympics.com/tokyo-2020/olympic-games/en/\
15+
results/table-tennis/olympic-schedule-and-results.htm\n']),
16+
(0x3F3F3F, 'Tkwndo', [Keycode.COMMAND, 't', -Keycode.COMMAND,
17+
'https://olympics.com/tokyo-2020/olympic-games/en/\
18+
results/Taekwondo/olympic-schedule-and-results.htm\n']),
19+
# 2nd row ----------
20+
(0x404000, 'Tennis', [Keycode.COMMAND, 't', -Keycode.COMMAND,
21+
'https://olympics.com/tokyo-2020/olympic-games/en/\
22+
results/tennis/olympic-schedule-and-results.htm\n']),
23+
(0x3F3F3F, 'TGym', [Keycode.COMMAND, 't', -Keycode.COMMAND,
24+
'https://olympics.com/tokyo-2020/olympic-games/en/\
25+
results/trampoline-gymnastics/olympic-schedule-and-results.htm\n']),
26+
(0x004000 , 'Trithln', [Keycode.COMMAND, 't', -Keycode.COMMAND,
27+
'https://olympics.com/tokyo-2020/olympic-games/en/\
28+
results/triathlon/olympic-schedule-and-results.htm\n']),
29+
# 3rd row ----------
30+
(0x3F3F3F, 'VBall', [Keycode.COMMAND, 't', -Keycode.COMMAND,
31+
'https://olympics.com/tokyo-2020/olympic-games/en/\
32+
results/volleyball/olympic-schedule-and-results.htm\n']),
33+
(0x004000, 'WPolo', [Keycode.COMMAND, 't', -Keycode.COMMAND,
34+
'https://olympics.com/tokyo-2020/olympic-games/en/\
35+
results/water-polo/olympic-schedule-and-results.htm\n']),
36+
(0x3F3F3F , 'Wlift', [Keycode.COMMAND, 't', -Keycode.COMMAND,
37+
'https://olympics.com/tokyo-2020/olympic-games/en/\
38+
results/weightlifting/olympic-schedule-and-results.htm\n']),
39+
# 4th row ----------
40+
(0x400000, 'Wrestl', [Keycode.COMMAND, 't', -Keycode.COMMAND,
41+
'https://olympics.com/tokyo-2020/olympic-games/en/\
42+
results/wrestling/olympic-schedule-and-results.htm\n']),
43+
(0x3F3F3F, '', [Keycode.COMMAND, 't', -Keycode.COMMAND,
44+
'']),
45+
(0x400000, '', [Keycode.COMMAND, 't', -Keycode.COMMAND,
46+
'']),
47+
# Encoder button ---
48+
(0x000000, '', [Keycode.COMMAND, 'w']) # Close window/tab
49+
]
50+
}

0 commit comments

Comments
 (0)