WPF Dockable window keypress event

WPF Dockable window keypress event

basautomationservices
Advocate Advocate
249 Views
1 Reply
Message 1 of 2

WPF Dockable window keypress event

basautomationservices
Advocate
Advocate

Hi all,

 

I'm developing an add-in for inventor which is a WPF window which is in a dockable window in inventor.

The window contains multiple textboxes. I'm using the wndproc hook to propagate keypress events from inventor to the wpf window. When I start typing in one of the textboxes, the first keypress is okay, but then after commands are activated that correspond to the keys. No 'LostFocus' event is triggered when this happens. I need to manually click the textbox again to focus and I can continue typing.


I've found these, but adding this had no effect. Also I assume that by adding the dockablewindow child Inventor is automatically the window owner.

https://adndevblog.typepad.com/manufacturing/2012/06/space-entered-in-a-text-box-of-a-modeless-dialo...

https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-command-repeat-with-space-bar-ap...

 


Did anyone ever encounter this behavior? Am I overlooking some setting?

Are there any workarounds? I thought maybe to disable all key events while typing, but I could not find anything in the inventor API only InteractionEvents.InteractionDisabled.

Contact me for custom app development info@basautomationservices.com. Follow below links to view my Inventor appstore apps.

Free apps: Smart Leader | Part Visibility Utility | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro


0 Likes
Accepted solutions (1)
250 Views
1 Reply
Reply (1)
Message 2 of 2

basautomationservices
Advocate
Advocate
Accepted solution

I've done a bit more testing and it turns out it was a different problem... 

Contact me for custom app development info@basautomationservices.com. Follow below links to view my Inventor appstore apps.

Free apps: Smart Leader | Part Visibility Utility | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro


0 Likes