pc-sports-1.py
 1  # SPDX-FileCopyrightText: 2021 Isaac Wellish for Adafruit Industries
 2  #
 3  # SPDX-License-Identifier: MIT
 4  
 5  # MACROPAD Olympic Hotkeys sports page 1
 6  # pylint: disable=line-too-long
 7  
 8  from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
 9  
10  app = {                # REQUIRED dict, must be named 'app'
11      'name' : 'Sports 1', # Application name
12      'macros' : [       # List of button macros...
13          # COLOR    LABEL    KEY SEQUENCE
14          # 1st row ----------
15          # 3x3 basketball schedule and results in new tab
16          (0x000040, '3x3Bask', [Keycode.CONTROL, 't', -Keycode.CONTROL,
17                                 'https://olympics.com/tokyo-2020/olympic-games/en/results/3x3-basketball/olympic-schedule-and-results.htm\n']),
18          (0x3F3F3F, 'Arch', [Keycode.CONTROL, 't', -Keycode.CONTROL,
19                              'https://olympics.com/tokyo-2020/olympic-games/en/results/archery/olympic-schedule-and-results.htm\n']),
20          (0x000040 , 'ArtGym', [Keycode.CONTROL, 't', -Keycode.CONTROL,
21                                 'https://olympics.com/tokyo-2020/olympic-games/en/results/artistic-gymnastics/olympic-schedule-and-results.htm\n']),
22          # 2nd row ----------
23          (0x3F3F3F, 'ArtSwim', [Keycode.CONTROL, 't', -Keycode.CONTROL,
24                                 'https://olympics.com/tokyo-2020/olympic-games/en/results/artistic-swimming/olympic-schedule-and-results.htm\n']),
25          (0x404000, 'Athl', [Keycode.CONTROL, 't', -Keycode.CONTROL,
26                              'https://olympics.com/tokyo-2020/olympic-games/en/results/athletics/olympic-schedule-and-results.htm\n']),
27          (0x3F3F3F , 'Bdmntn', [Keycode.CONTROL, 't', -Keycode.CONTROL,
28                                 'https://olympics.com/tokyo-2020/olympic-games/en/results/badminton/olympic-schedule-and-results.htm\n']),
29          # 3rd row ----------
30          (0x404000, 'BB/SB', [Keycode.CONTROL, 't', -Keycode.CONTROL,
31                               'https://olympics.com/tokyo-2020/olympic-games/en/results/baseball-softball/olympic-schedule-and-results.htm\n']),
32          (0x3F3F3F, 'BaskBl', [Keycode.CONTROL, 't', -Keycode.CONTROL,
33                                'https://olympics.com/tokyo-2020/olympic-games/en/results/basketball/olympic-schedule-and-results.htm\n']),
34          (0x004000 , 'BVoll', [Keycode.CONTROL, 't', -Keycode.CONTROL,
35                                'https://olympics.com/tokyo-2020/olympic-games/en/results/beach-volleyball/olympic-schedule-and-results.htm\n']),
36          # 4th row ----------
37          (0x3F3F3F, 'Boxing', [Keycode.CONTROL, 't', -Keycode.CONTROL,
38                                'https://olympics.com/tokyo-2020/olympic-games/en/results/boxing/olympic-schedule-and-results.htm\n']),
39          (0x004000, 'CanoeSl', [Keycode.CONTROL, 't', -Keycode.CONTROL,
40                                 'https://olympics.com/tokyo-2020/olympic-games/en/results/canoe-slalom/olympic-schedule-and-results.htm\n']),
41          (0x3F3F3F, 'CanoeSp', [Keycode.CONTROL, 't', -Keycode.CONTROL,
42                                 'https://olympics.com/tokyo-2020/olympic-games/en/results/canoe-sprint/olympic-schedule-and-results.htm \n']),
43          # Encoder button ---
44          (0x000000, '', [Keycode.CONTROL, 'w']) # Close window/tab
45      ]
46  }