How to detect if ctrl is pressed in the OnRadialMarkerMenu event?

How to detect if ctrl is pressed in the OnRadialMarkerMenu event?

psaarloos
Collaborator Collaborator
426 Views
2 Replies
Message 1 of 3

How to detect if ctrl is pressed in the OnRadialMarkerMenu event?

psaarloos
Collaborator
Collaborator

Hi,

 

I am trying to create a RedialMarkerMenu that needs to be shown in several environments. Since I don't want to change the default radialmarker menu's I want to add the new one that shows up when the CTRL button is pressed. The Inventor Customize UI has the option to set the 'Sub-Environment' for a radial marker menu. How can I achieve this by API?

 

Regards,

Pim

Regards,
Pim Saarloos
Product Manager
If my post answers your question, please click the "Accept as Solution" button. Kudos are much appreciated!
0 Likes
Accepted solutions (1)
427 Views
2 Replies
Replies (2)
Message 2 of 3

philippe.leefsma
Alumni
Alumni
Accepted solution

Hi Pim,

 

Unfortunately I don't think the API provide a built-in feature to manage that. It would be relatively straightforward to determine if CTRL is pressed relying on .Net API, hence act accordingly when you happend your controls to the radial menu:

 

http://stackoverflow.com/questions/1100285/how-to-detect-the-currently-pressed-key

 

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 3

psaarloos
Collaborator
Collaborator

Hi Philippe,

 

That works! Thanks! The code below did the tricj:

 

if (Control.ModifierKeys == Keys.Control)

{

// Do Stuff

}

Regards,
Pim Saarloos
Product Manager
If my post answers your question, please click the "Accept as Solution" button. Kudos are much appreciated!
0 Likes