diff --git a/Macropad_Hotkeys/code.py b/Macropad_Hotkeys/code.py index f15b9cb2b..b5ed21ace 100755 --- a/Macropad_Hotkeys/code.py +++ b/Macropad_Hotkeys/code.py @@ -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: diff --git a/Macropad_Hotkeys/macros/linux-firefox.py b/Macropad_Hotkeys/macros/linux-firefox.py index 36aa871b3..3dfd63ba2 100644 --- a/Macropad_Hotkeys/macros/linux-firefox.py +++ b/Macropad_Hotkeys/macros/linux-firefox.py @@ -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 diff --git a/Macropad_Hotkeys/macros/mac-safari.py b/Macropad_Hotkeys/macros/mac-safari.py index 7b96e96c6..0aec9a9d4 100755 --- a/Macropad_Hotkeys/macros/mac-safari.py +++ b/Macropad_Hotkeys/macros/mac-safari.py @@ -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 diff --git a/Macropad_Hotkeys/macros/win-edge.py b/Macropad_Hotkeys/macros/win-edge.py index 7941df7ee..5e9cc10de 100755 --- a/Macropad_Hotkeys/macros/win-edge.py +++ b/Macropad_Hotkeys/macros/win-edge.py @@ -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