Hot keys of Moi3D
All  1-14  15-16

Previous
Next
 From:  Michael Gibson
204.15 In reply to 204.13 
Hi Petr, there isn't any way to do that exactly right now. Right now keystrokes don't generate any particular scriptable MoI-specific events, since they are more intended to launch keyboard shortcuts from the moi.ini file.

I've attached one method - this is set up as a command, not a script, so set the keyboard shortcut as B=BoolLaunch (no .js at the end).

Note that you need to explicitly set focus on to the particular element so that it will receive keyboard events.

Still there is a problem - if you have any keyboard shortcuts set up for "i", "d", or "u", those will always get triggered with a keystroke and the shortcut will eat the keystroke so I don't think the regular HTML event will trigger in that case. There is a special case for this if you have a numeric input and your keystroke is a numeric character, it won't eat it in that case but there isn't a way to override shortcuts for other keystrokes right now.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  tyglik
204.16 In reply to 204.15 
Hi Michael,

Thanks for helping.

>>Still there is a problem - if you have any keyboard shortcuts
>>set up for "i", "d", or "u", those will always get
>>triggered with a keystroke and the shortcut will eat
>>the keystroke so I don't think the regular HTML event
>>will trigger in that case.

I have tried it and noticed that a keyboard shortcut is eaten by the keystroke only when defining scripts directly. For instance I set the shortcut I=script:moi.geometryDatabase.invertSelection();" then typing "bi" (the alias for BooleanIntersection in the "BoolLaunch.htm" file) triggers both Invert and BooleanIntersection command.

But there is way to trigger only the BooleanIntersection command by typing alias in case I make the "Invert.js" file with a script for inverting selection, copy it to the \commands directory and define the shortcut "I=Invert".
Unfortunately, it causes that the shortcut "I" cannot be used further to invert a selection from within running command since it aborts current one.

Anyway, I guess there are more important things to do for V1,V2 than an issue of aliases...

Petr

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-14  15-16