Shortcut key command scripting

 From:  Michael Gibson
6309.3 In reply to 6309.1 
Hi william,

> Rotate would be R or RT
> Revolve would be RV
> Rectangle would be RC or REC

So do you mean you want to just type RT just by itself and not RT [Enter] ?

Right now there isn't any way set up for doing that kind of "keystroke sequence" type of thing, the current way shortcut keys work is just by a single keystroke. You can have modifier keys like shift or alt but they have to be held down at the same time as the triggering keystroke.

Doing a sequence of keys is kind of tricky because it has to involve stuff like waiting for a certain period of time after you press R to determine if you were actually doing a plain R or whether that was only the first key in a sequence.

I would like to add a sequence mechanism in the future but I don't know when that will happen. Overall this kind of highly detailed key driven type approach just has not been a focus area.

If you want to do something like RT [Enter] instead of just plain RT, then you could take whatever command you wanted to make for RT and copy its .js and .htm to be named RT.js and RT.htm as new files in the \commands folder, then that will make a new command named RT available which you can run by command line entry as mentioned above. I'm not so sure that this is a good idea to do a whole lot of this though since you'll be making copies of a lot of commands and you'll need to redo all those copies every time a new beta release comes out.

There is also another setting in moi.ini, under [UI]:
[UI]
...
TreatSpaceAsEnter=n


If you set that to =y then you can push the space bar for an equivalent to pushing Enter, it can be easier to hit on the left side.


I'd really recommend just using the regular mouse click buttons for most things though like revolve for example. Only put in shortcut keys for things that you are really using very frequently, not just every single command.


- Michael