Closed aptonline closed 2 years ago
Ok I think I have worked it out:
(0x540908, 'Launch Twitter', [Keycode.COMMAND, Keycode.SPACE," Twitter",Keycode.RETURN]),
Had to add a space at the begining of the text to send otherwise it would truncate the first letter. Can't get the above to send the return key either.
And worked it out by adding \n
at the end of the string to search for :)
(0x540908, 'Launch Twitter', [Keycode.COMMAND, Keycode.SPACE," Twitter\n"]),
Try using Keycode.ENTER
to send the return key command. That's what I used in macros/numpad.py
.
And I really like your idea of using it for an app launcher! Thanks!
It is possible to bind a string to a key using the macros?
Use case would be for launching an app for example,
command + space
opens the Spotlight Search (Mac) and then I need to ''send' the application name (via the string) and then send areturn
to launch.Maybe I'm missing something but in the macropod docs I did find the following but can't find a way to implement with your hotkeys:
macropad.keyboard_layout.write("Hello, World!")
Many thanks.