/ Macropad_Olympic_Hotkeys / windows / pc-olympics-home.py
pc-olympics-home.py
 1  # SPDX-FileCopyrightText: 2021 Isaac Wellish for Adafruit Industries
 2  #
 3  # SPDX-License-Identifier: MIT
 4  
 5  # MACROPAD Olympic Hotkeys main page
 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' : 'Olympics Home', # Application name
12      'macros' : [       # List of button macros...
13          # COLOR    LABEL    KEY SEQUENCE
14          # 1st row ----------
15          (0x004000, '< Tab', [Keycode.CONTROL, Keycode.SHIFT, Keycode.TAB]),
16          (0x004000, 'Tab >', [Keycode.CONTROL, Keycode.TAB]),
17          (0x400000, 'Up', [Keycode.SHIFT, ' ']),      # Scroll up
18          # 2nd row ----------
19          # Full schedule in new tab
20          (0x3F3F3F, 'Sched', [Keycode.CONTROL, 't', -Keycode.CONTROL,
21                               'https://olympics.com/tokyo-2020/olympic-games/en/results/all-sports/olympic-schedule.htm\n']),
22          # Medal standings in new tab
23          (0x404000 , 'Medals', [Keycode.CONTROL, 't', -Keycode.CONTROL,
24                                 'https://olympics.com/tokyo-2020/olympic-games/en/results/all-sports/medal-standings.htm\n']),
25          (0x400000, 'Down', ' '),     # Scroll down
26          # 3rd row ----------
27          # Peacock streaming service Olympics home in new tab
28          (0x000040, 'PC', [Keycode.CONTROL, 't', -Keycode.CONTROL,
29                            'https://www.peacocktv.com/watch/2020-tokyo-olympics\n']),
30          # Full schedule in new tab
31          (0x000040, 'NBC', [Keycode.CONTROL, 't', -Keycode.CONTROL,
32                             'https://www.usanetwork.com/live?brand=cnbc&callsign=nbc\n']),
33          # Medal standings in new tab
34          (0x000040 , 'YT', [Keycode.CONTROL, 't', -Keycode.CONTROL,
35                             'https://www.youtube.com/channel/UCTl3QQTvqHFjurroKxexy2Q\n']),
36          # 4th row ----------
37          # NBC in new tab
38          (0x000040, 'CNBC', [Keycode.CONTROL, 't', -Keycode.CONTROL,
39                              'https://www.usanetwork.com/live?brand=nbc&callsign=cnbc\n']),
40          # USA in new tab
41          (0x000040, 'USA', [Keycode.CONTROL, 't', -Keycode.CONTROL,
42                             'https://www.usanetwork.com/live?brand=usa&callsign=usa_east\n']),
43          # NBCSN in new tab
44          (0x000040, 'NBCSN', [Keycode.CONTROL, 't', -Keycode.CONTROL,
45                               'https://www.usanetwork.com/live?brand=nbc-sports&callsign=nbcsn\n']),
46          # Encoder button ---
47          (0x000000, '', [Keycode.CONTROL, 'w']) # Close window/tab
48      ]
49  }