Pick method and Esp and Enter keys

Pick method and Esp and Enter keys

wmgshurik
Enthusiast Enthusiast
410 Views
2 Replies
Message 1 of 3

Pick method and Esp and Enter keys

wmgshurik
Enthusiast
Enthusiast

Hello!

 

I use CommandManager.Pick() and want to handle escape and enter keys at the same time, but I dont know how to do it. 

 

Inventor blocks WindowsForms's KeyEvents.  If I create new InteractionEvents, it works but not with Pick method. This function has some own interaction events, whiсh dont want to join to MY interaction events....

 

Have you got any ideas?

0 Likes
411 Views
2 Replies
Replies (2)
Message 2 of 3

wmgshurik
Enthusiast
Enthusiast
 invApp.CommandManager.UserInputEvents.OnTerminateCommand += UserInputEvents_OnTerminateCommand;

private void UserInputEvents_OnTerminateCommand(string CommandName, NameValueMap Context)
        {
            MessageBox.Show("Terminated");
        }

This is for escape key.

But how can I catch Enter key?

0 Likes
Message 3 of 3

wmgshurik
Enthusiast
Enthusiast

Well, OnTerminateCommand also triggered when command finishes normally, but it is not a problem in my case.

 

But Enter key doesnt work.

0 Likes