diff options
Diffstat (limited to 'src/gui/search')
| -rw-r--r-- | src/gui/search/SearchView.cpp | 9 | ||||
| -rw-r--r-- | src/gui/search/SearchView.h | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/search/SearchView.cpp b/src/gui/search/SearchView.cpp index 662e756..526592a 100644 --- a/src/gui/search/SearchView.cpp +++ b/src/gui/search/SearchView.cpp @@ -714,7 +714,12 @@ void SearchView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bo { if (key == KEY_ESCAPE) c->Exit(); - if (ctrl) - c->InstantOpen(ctrl); + else if (key == KEY_LCTRL || key == KEY_RCTRL) + c->InstantOpen(true); } +void SearchView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + if (key == KEY_LCTRL || key == KEY_RCTRL) + c->InstantOpen(false); +} diff --git a/src/gui/search/SearchView.h b/src/gui/search/SearchView.h index 5752a2c..4a68498 100644 --- a/src/gui/search/SearchView.h +++ b/src/gui/search/SearchView.h @@ -68,6 +68,7 @@ public: virtual void OnTick(float dt); virtual void OnMouseWheel(int x, int y, int d); virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); }; |
