You can add a shortcut key to the beginning of your script with a directive in a comment like so...
- Code: Select all
-- @shortcut ctrl + t
In this example I'm setting the shortcut to CTRL-t.
Some other thoughts on your script would be..
1) You need to check and see if a node is selected, if not, I would exit the script silently.
2) Check if the selected node is a placement node, if not, exit silently.
3) If a node is selected and it's a placement node then add 90 to the Y axis. You will need to look at the API to see how to do that.
I think exiting silently from the script will make the workflow nicer, otherwise you will have to deal with a popup every time you accidentally press the shortcut key.
Jason