0

MACROPAD almost working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MACROPAD almost working

by DocSavage on Mon Jul 26, 2021 7:18 pm

I wanted to tweak the edge macro file to have prev open tab and next open tab.

(0x202000, '< Tab', [Keycode.CONTROL, Keycode.SHIFT, Keycode.TAB]),
(0x202000, 'Tab >', [Keycode.CONTROL, Keycode.TAB]),

Compiles and runs but the tab > dosnt work. the < tab does.

exhibits the same thing under chrome. Any hints on how to debug?

-Andy

DocSavage
 
Posts: 2
Joined: Tue Mar 17, 2015 11:39 am

Re: MACROPAD almost working

by adafruit_support_carter on Tue Jul 27, 2021 1:34 pm

Not sure. That code snippet looks OK. Can you post your complete modified win-edge.py file here.

adafruit_support_carter
 
Posts: 21055
Joined: Tue Nov 29, 2016 2:45 pm

Re: MACROPAD almost working

by DocSavage on Tue Jul 27, 2021 6:27 pm

Here it is - I have stared at it until I am blue in the face...

-Andy

Code: Select all | TOGGLE FULL SIZE
# MACROPAD Hotkeys example: Google Chrome
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values

app = {                      # REQUIRED dict, must be named 'app'
    'name' : 'Windows Edge', # Application name
    'macros' : [             # List of button macros...
        # COLOR    LABEL    KEY SEQUENCE
        # 1st row ----------
        (0x004000, '< Back', [Keycode.ALT, Keycode.LEFT_ARROW]),
        (0x004000, 'Fwd >', [Keycode.ALT, Keycode.RIGHT_ARROW]),
        (0x400000, 'Up', [Keycode.SHIFT, ' ']),      # Scroll up
        # 2nd row ----------
        (0x202000, '< Tab', [Keycode.CONTROL, Keycode.SHIFT, Keycode.TAB]),
        (0x202000, 'Tab >', [Keycode.CONTROL, Keycode.TAB]),
        (0x400000, 'Down', ' '),                     # Scroll down
        # 3rd row ----------
        (0x000040, 'Reload', [Keycode.CONTROL, 'r']),
        (0x000040, 'Home', [Keycode.ALT, Keycode.HOME]),
        (0x000040, 'Private', [Keycode.CONTROL, 'N']),
        # 4th row ----------
        (0x000000, 'Ada', [Keycode.CONTROL, 'n', -Keycode.COMMAND,
                           'www.adafruit.com\n']),   # Adafruit in new window
        (0x800000, 'Digi', [Keycode.CONTROL, 'n', -Keycode.COMMAND,
                            'www.digikey.com\n']),   # Digi-Key in new window
        (0x101010, 'Hacks', [Keycode.CONTROL, 'n', -Keycode.COMMAND,
                             'www.hackaday.com\n']), # Hack-a-Day in new win
        # Encoder button ---
        (0x000000, '', [Keycode.CONTROL, 'w']) # Close tab
    ]
}

DocSavage
 
Posts: 2
Joined: Tue Mar 17, 2015 11:39 am

Re: MACROPAD almost working

by adafruit_support_carter on Tue Jul 27, 2021 7:43 pm

Not sure. It seems to work OK here using your file. As another sanity check, does just doing the <CTRL><TAB> sequence from your keyboard (not the MacroPad) work?

adafruit_support_carter
 
Posts: 21055
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.