pc-sports-4.py
 1  # SPDX-FileCopyrightText: 2021 Isaac Wellish for Adafruit Industries
 2  #
 3  # SPDX-License-Identifier: MIT
 4  
 5  # MACROPAD Olympic Hotkeys sports page 4
 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 4', # Application name
12      'macros' : [       # List of button macros...
13          # COLOR    LABEL    KEY SEQUENCE
14          # 1st row ----------
15          (0x3F3F3F, 'Swim', [Keycode.CONTROL, 't', -Keycode.CONTROL,
16                              'https://olympics.com/tokyo-2020/olympic-games/en/results/swimming/olympic-schedule-and-results.htm\n']),
17          (0x404000, 'TTennis', [Keycode.CONTROL, 't', -Keycode.CONTROL,
18                                 'https://olympics.com/tokyo-2020/olympic-games/en/results/table-tennis/olympic-schedule-and-results.htm\n']),
19          (0x3F3F3F, 'Tkwndo', [Keycode.CONTROL, 't', -Keycode.CONTROL,
20                                'https://olympics.com/tokyo-2020/olympic-games/en/results/Taekwondo/olympic-schedule-and-results.htm\n']),
21          # 2nd row ----------
22          (0x404000, 'Tennis', [Keycode.CONTROL, 't', -Keycode.CONTROL,
23                                'https://olympics.com/tokyo-2020/olympic-games/en/results/tennis/olympic-schedule-and-results.htm\n']),
24          (0x3F3F3F, 'TGym', [Keycode.CONTROL, 't', -Keycode.CONTROL,
25                              'https://olympics.com/tokyo-2020/olympic-games/en/results/trampoline-gymnastics/olympic-schedule-and-results.htm\n']),
26          (0x004000 , 'Trithln', [Keycode.CONTROL, 't', -Keycode.CONTROL,
27                                  'https://olympics.com/tokyo-2020/olympic-games/en/results/triathlon/olympic-schedule-and-results.htm\n']),
28          # 3rd row ----------
29          (0x3F3F3F, 'VBall', [Keycode.CONTROL, 't', -Keycode.CONTROL,
30                               'https://olympics.com/tokyo-2020/olympic-games/en/results/volleyball/olympic-schedule-and-results.htm\n']),
31          (0x004000, 'WPolo', [Keycode.CONTROL, 't', -Keycode.CONTROL,
32                               'https://olympics.com/tokyo-2020/olympic-games/en/results/water-polo/olympic-schedule-and-results.htm\n']),
33          (0x3F3F3F , 'Wlift', [Keycode.CONTROL, 't', -Keycode.CONTROL,
34                                'https://olympics.com/tokyo-2020/olympic-games/en/results/weightlifting/olympic-schedule-and-results.htm\n']),
35          # 4th row ----------
36          (0x400000, 'Wrestl', [Keycode.CONTROL, 't', -Keycode.CONTROL,
37                                'https://olympics.com/tokyo-2020/olympic-games/en/results/wrestling/olympic-schedule-and-results.htm\n']),
38          (0x3F3F3F, '', [Keycode.CONTROL, 't', -Keycode.CONTROL,
39                          '']),
40          (0x400000, '', [Keycode.CONTROL, 't', -Keycode.CONTROL,
41                          '']),
42          # Encoder button ---
43          (0x000000, '', [Keycode.CONTROL, 'w']) # Close window/tab
44      ]
45  }