Disabling Specific Hotkeys #2395
-
OSG Version: 3.4.0 I am looking for a way to disable specific hotkey functionality. Specifically, the escape key closes the viewer window and I'd like it to not do that. The proper thing to do would probably be to intercept the keypress signal and kill it in my application, however this is not working for some reason -- OSGEarth still receives the signal and closes the viewer. I was wondering if there was an easy way I could disable that functionality (like a command line arg to pass in during compile) in OSGEarth, other than just completely removing the code and rebuilding. Any tips are appreciated, let me know if more info is needed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I am not aware of a compile-time flag to disable it. |
Beta Was this translation helpful? Give feedback.
I am not aware of a compile-time flag to disable it.
This functionality comes from OpenSceneGraph (not osgEarth); I believe you can call
osg::Viewer::setKeyEventSetsDone(0);
to disable close-on-ESC.