0

ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Macro
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Macro

by vguy on Fri Jul 30, 2021 6:22 pm

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

Code: Select all | TOGGLE FULL SIZE
# 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
    ]
}


vguy
 
Posts: 1
Joined: Mon Nov 20, 2017 9:14 pm

Re: ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Ma

by macewmi on Mon Aug 02, 2021 7:03 pm

I like it. Thanks for sharing.

macewmi
 
Posts: 30
Joined: Sat Feb 08, 2020 10:26 am

Re: ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Ma

by DaveDuJour on Tue Aug 10, 2021 5:36 pm

This is excellent. Thank you!

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

Re: ADABOX 019 MACROPAD Hotkeys YouTube Playback Controls Ma

by blakbuzzrd on Wed Aug 11, 2021 5:08 pm

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!

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

Please be positive and constructive with your questions and comments.