Executing Fusion command depending on context from external script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
After looking through the API documentation and viewing many video's I was encouraged to write my questions to this forum. Here we go: sorry that I could not easily locate this information.
I am looking for a way to add a configurable keyboard (Touch Portal, see https://www.touch-portal.com/ ) for Fusion 360. You more or less would get the LCD buttons on a tablet, much like a 3Dconnexion Spacemouse Enterprise (though better, as for Fusion this mouse does not change buttons on context, like it does for NX e.g.).
I already extracted the necessary icons (thousands of .png files) from the runtime resources, so I can build pages with buttons.
For this to work I need two functionalities:
- Awareness of the context that fusion 360 is in to know which commands are applicable: solid/surface/mesh/sheet metal/sketch and Create/prepare/modify/assemble/assemble/construct
- A manner to execute an external script or means to send keystrokes to Fusion 360 to execute a command "as if" a shortcut key is pressed. Touch portal CAN send keystrokes to Fusion: shortcuts work, but many commands will not have shortcuts.
for the first: creating a file on disk whenever the context changes would be nice, e.g. when a transition occurs between Solid and sketch (but also surface/mesh/sheet metal tools). Where could this be integrated in the scripting environment?
for the second: Could I send a keystroke to Fusion upon which a script is executed? Ideally taking into account parameters that I provide? If a parameter cannot be provided, I could provide the command to use in a text file.
There was a way to "list" all possible commands from a script, but I need to locate this again. I link to this would be helpful.
Any hints and tips would be appreciated. Once finished I will make this available for anyone to use (no guarantees on timing though).