[Current version 0.31]
Update: 29-06-23
Added option to detect left mouse button being pressed and released, shortcut from list can be selected to be sent when triggered.
Can be used to send clean brush command when using mixer.
-----------------------------------------------------------------------------------------------------------------------------------------
I have created a PC (Windows) app with the Affinity suite in mind but will work with any windowed application that accepts keyboard shortcuts. It uses text files to stores sequences of shortcuts that are actioned by clicking their respective button in the app. There is no limit to the number of shortcuts, the text files can be switched between as required. Each button is defined with a description and the sequence, keyboard modifiers that are accepted are:
Ctrl Alt Shift Up Down Left Right
The first line of the text file configures the target window, the position and size of the buttons along with a couple of other option as follows:
Target window name - This can match any part of the window title for the application you want to send the key sequence to.
Button horizontal size
Button vertical size
Start position from the left for first button
Start position from the top for first button
Distance between adjacent buttons horizontally
Distance between adjacent buttons vertically
Number of buttons in a row horizontally - will create new row automatically when exceeded
Time in milliseconds for target window to be active before key sequence sent
Is the application on top of other windows, 1 for yes, 0 for no
Clicking on a dark blue button at the end of the named buttons will show a dialog to configure its setting by adding the description and key sequence. Saving the new button details will reload the list. The individual text files can be viewed/edited in the app by clicking the "CONFIGURATION FILE" text, saving will again reload the buttons, this will also apply any changes made to the first configuration line. If the text on the buttons are "greyed out" it means the target window has not been detected. The app will briefly flash green when switching between the text files to show the window has been detected.
All feedback is welcome.
For anyone concerned running the .exe file here is the clean report from VirusTotal, I do appreciate there is still a level of trust to be gained however and happy to answer any questions.
https://www.virustotal.com/gui/file/baf444a32c8d73abf451ce48c8397c95bcd64617fbb73ddd6c22ae2e3bd6aa51
The app is written in VB.Net (Visual Basic), if anyone knows if this can run natively or with modifications/helpers on Mac hardware let me know.
The included text file in the zip is named for Affinity Photo, you can just rename and modify as needed or alternatively create one for each app you want to send key sequences to.
KeySender.zip