Strange RhinoApp.KeyboardEvent

Hello,

I have a strange RhinoApp.KeyboardEvent recurtion.
A kind of resonance that appears randomly.
Sometimes there are two calls and sometimes it takes more than a minute for the calls to end.

I don’t do much here.
I have the event defined here: SeeRhino/1 App.cs at main · corbane/SeeRhino · GitHub
And I wrote the information in a TextBox here: SeeRhino/0 See.cs at main · corbane/SeeRhino · GitHub

Also, if the focus is the viewport, the event is not always captured.

Are there any particularities to using KeyboardEvent?
Is KeyboardEvent a stable API?

Thank you, Jmv.

On Windows, setting a keyboard hook uses the standard Windows hooking mechanism, which is SetWindowsHookEx with the WH_KEYBOARD flag. So it should be plenty stable, at least for how we define stable.

Keep in mind when writing UI that other things (e.g. windows, controls, etc.) will also want keyboard control. So it’s best to use Rhino keyboard hooking sparingly and only when necessary.

– Dale

OK, I see,
So I understand even less why there is this effect of “resonance”.
(The message appears not to be consumed or reinjected.)
Thank you.

Anyway, sorry, but no, the Rhino KeyboardEvent API inserts some weird behavior that makes it unusable.