Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hotkey 'list' support to send concurrent keycodes #1719

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Macropad_Hotkeys/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ def switch(self):
MACROPAD.keyboard.press(item)
else:
MACROPAD.keyboard.release(-item)
elif isinstance(item, list):
MACROPAD.keyboard.send(*item)
else:
MACROPAD.keyboard_layout.write(item)
else:
Expand Down
4 changes: 2 additions & 2 deletions Macropad_Hotkeys/macros/linux-firefox.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
(0x000040, 'Home', [Keycode.CONTROL, 'h']),
(0x000040, 'Private', [Keycode.CONTROL, Keycode.SHIFT, 'p']),
# 4th row ----------
(0x101010, 'Ada', [Keycode.CONTROL, 't', -Keycode.CONTROL,
(0x101010, 'Ada', [[Keycode.CONTROL, KEYCODE.T],
'www.adafruit.com\n']), # adafruit.com in a new tab
(0x000040, 'Dev Mode', [Keycode.F12]), # dev mode
(0x101010, 'Digi', [Keycode.CONTROL, 't', -Keycode.CONTROL,
(0x101010, 'Digi', [[Keycode.CONTROL, KEYCODE.T],
'digikey.com\n']), # digikey in a new tab
# Encoder button ---
(0x000000, '', [Keycode.CONTROL, 'w']) # Close window/tab
Expand Down
6 changes: 3 additions & 3 deletions Macropad_Hotkeys/macros/mac-safari.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
(0x000040, 'Home', [Keycode.COMMAND, 'H']),
(0x000040, 'Private', [Keycode.COMMAND, 'N']),
# 4th row ----------
(0x000000, 'Ada', [Keycode.COMMAND, 'n', -Keycode.COMMAND,
(0x000000, 'Ada', [[Keycode.COMMAND, KEYCODE.N],
'www.adafruit.com\n']), # Adafruit in new window
(0x800000, 'Digi', [Keycode.COMMAND, 'n', -Keycode.COMMAND,
(0x800000, 'Digi', [[Keycode.COMMAND, KEYCODE.N],
'www.digikey.com\n']), # Digi-Key in new window
(0x101010, 'Hacks', [Keycode.COMMAND, 'n', -Keycode.COMMAND,
(0x101010, 'Hacks', [[Keycode.COMMAND, KEYCODE.N],
'www.hackaday.com\n']), # Hack-a-Day in new win
# Encoder button ---
(0x000000, '', [Keycode.COMMAND, 'w']) # Close window/tab
Expand Down
6 changes: 3 additions & 3 deletions Macropad_Hotkeys/macros/win-edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
(0x000040, 'Home', [Keycode.ALT, Keycode.HOME]),
(0x000040, 'Private', [Keycode.CONTROL, 'N']),
# 4th row ----------
(0x000000, 'Ada', [Keycode.CONTROL, 'n', -Keycode.COMMAND,
(0x000000, 'Ada', [[Keycode.CONTROL, KEYCODE.N],
'www.adafruit.com\n']), # Adafruit in new window
(0x800000, 'Digi', [Keycode.CONTROL, 'n', -Keycode.COMMAND,
(0x800000, 'Digi', [[Keycode.CONTROL, KEYCODE.N],
'www.digikey.com\n']), # Digi-Key in new window
(0x101010, 'Hacks', [Keycode.CONTROL, 'n', -Keycode.COMMAND,
(0x101010, 'Hacks', [[Keycode.CONTROL, KEYCODE.N],
'www.hackaday.com\n']), # Hack-a-Day in new win
# Encoder button ---
(0x000000, '', [Keycode.CONTROL, 'w']) # Close tab
Expand Down