ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Macro

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
vguy
 
Posts: 1
Joined: Mon Nov 20, 2017 9:14 pm

ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Macro

Post by vguy »

My first macro developed for the Macropad Hotkeys code. Enjoy!

Code: Select all

# MACROPAD Hotkeys: YouTube playback on Chrome
# Contributed by vguy

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

app = {                    # REQUIRED dict, must be named 'app'
    'name' : 'YouTube',  # Application name
    'macros' : [           # List of button macros...
        # COLOR    LABEL    KEY SEQUENCE
        # 1st row ----------
        (0x400000, 'Pause', ['k']),  # Play/Pause toggle
        (0x300505, 'B 1f', [',']),  # While Paused go back 1 frame
        (0x300505, 'F 1f', ['.']),  # While Paused go forward 1 frame
        # 2nd row ----------
        (0x000030, 'Full', ['f']),  # Fullscreen toggle
        (0x200520, 'B 10s', ['j']),  # Seek back 10 seconds
        (0x200520, 'F 10s', ['l']),  # Seek forward 10 seconds
        # 3rd row ----------
        (0x052005, 'Mute', ['m']),  # Mute audio
        (0x303005, 'Spd -', ['<']),  # Decrease playback speed
        (0x303005, 'Spd +', ['>']),  # Increase playback speed
        # 4th row ----------
        (0x050505, 'CC', ['c']),  # Activate/Deactivate close captions
        (0x401005, 'Prev', [Keycode.SHIFT, 'p']),  # Previous Video
        (0x401005, 'Next', [Keycode.SHIFT, 'n']),  # Next Video
        # Encoder button ---
        (0x050505, '', [Keycode.ESCAPE])  # ESC
    ]
}


User avatar
macewmi
 
Posts: 69
Joined: Sat Feb 08, 2020 10:26 am

Re: ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Ma

Post by macewmi »

I like it. Thanks for sharing.

User avatar
DaveDuJour
 
Posts: 1
Joined: Tue Aug 03, 2021 3:36 am

Re: ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Ma

Post by DaveDuJour »

This is excellent. Thank you!

User avatar
blakbuzzrd
 
Posts: 8
Joined: Tue Feb 09, 2021 10:12 pm

Re: ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Ma

Post by blakbuzzrd »

Thanks for these! I actually never used these controls before now, because I never bothered to learn the keyboard commands. And now I don't have to!

Locked
Please be positive and constructive with your questions and comments.

Return to “AdaBox! Show us what you made!”