diff --git a/ogl_editor/src/Editor.c b/ogl_editor/src/Editor.c index 75bb3a1..56c9f19 100644 --- a/ogl_editor/src/Editor.c +++ b/ogl_editor/src/Editor.c @@ -219,14 +219,17 @@ void Editor_update() /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void Editor_keyDown(int key) +bool Editor_keyDown(int key) { + bool handled_key = true; + //printf("callBack %d\n", key); switch (key) { case EMGUI_ARROW_DOWN : start_pos++; break; case EMGUI_ARROW_UP : start_pos--; break; + default : handled_key = false; break; } if (start_pos < -19) @@ -241,7 +244,11 @@ void Editor_keyDown(int key) if (offset > s_testChannel.maxRange) s_testChannel.maxRange = offset; + + return true; } + + return handled_key; } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/ogl_editor/src/macosx/RocketView.m b/ogl_editor/src/macosx/RocketView.m index 21ef17d..540d8c7 100644 --- a/ogl_editor/src/macosx/RocketView.m +++ b/ogl_editor/src/macosx/RocketView.m @@ -70,10 +70,10 @@ } } - Editor_keyDown(keyCode); - Editor_update(); + if (!Editor_keyDown(keyCode)) + [super keyDown:theEvent]; - //[super keyDown:theEvent]; + Editor_update(); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////