As stated earlier, this project is based off the MACROPAD Hotkeys guide. Once you have read through that guide you are ready to add the files from this guide.

# SPDX-FileCopyrightText: 2021 Isaac Wellish for Adafruit Industries
# SPDX-License-Identifier: MIT

# MACROPAD Olympic Hotkeys main page
# pylint: disable=line-too-long

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

app = {                # REQUIRED dict, must be named 'app'
    'name' : 'Olympics Home', # Application name
    'macros' : [       # List of button macros...
        # 1st row ----------
        (0x004000, '< Tab', [Keycode.CONTROL, Keycode.SHIFT, Keycode.TAB]),
        (0x004000, 'Tab >', [Keycode.CONTROL, Keycode.TAB]),
        (0x400000, 'Up', [Keycode.SHIFT, ' ']),      # Scroll up
        # 2nd row ----------
        # Full schedule in new tab
        (0x3F3F3F, 'Sched', [Keycode.COMMAND, 't', -Keycode.COMMAND,
        # Medal standings in new tab
        (0x404000 , 'Medals', [Keycode.COMMAND, 't', -Keycode.COMMAND,
        (0x400000, 'Down', ' '),     # Scroll down
        # 3rd row ----------
        # Peacock streaming service Olympics home in new tab
        (0x000040, 'PC', [Keycode.COMMAND, 't', -Keycode.COMMAND,
        # NBC channel in new tab
        (0x000040, 'NBC', [Keycode.COMMAND, 't', -Keycode.COMMAND,
        # Olympics youtube channel in new tab
        (0x000040 , 'YT', [Keycode.COMMAND, 't', -Keycode.COMMAND,
        # 4th row ----------
        # CNBC in new tab
        (0x000040, 'CNBC', [Keycode.COMMAND, 't', -Keycode.COMMAND,
        # USA in new tab
        (0x000040, 'USA', [Keycode.COMMAND, 't', -Keycode.COMMAND,
        # NBCSN in new tab
        (0x000040, 'NBCSN', [Keycode.COMMAND, 't', -Keycode.COMMAND,
        # Encoder button ---
        (0x000000, '', [Keycode.COMMAND, 'w']) # Close window/tab

Download the entire project code from above and save the specified files in your macros folder on your CIRCUITPY drive. 

Make sure to delete any other unwanted files in this folder. The macros folder on your CIRCUITPY drive should look like this.

Mac or Windows?

There are two folders of macros code in this project. One for Mac users and one for Windows users.

When you download the project bundle drag only the files for your operating system into macros folder on your CIRCUITPY drive.

This guide was first published on Jul 27, 2021. It was last updated on 2021-07-27 17:24:53 -0400.

This page (Project Code) was last updated on Apr 23, 2022.

Text editor powered by tinymce.