From 44b1f58bb25817d2bc4578e727ce637752d00299 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 10 Apr 2021 14:27:20 +0300 Subject: Allow using Tab key for bindings Tab was always consumed by focus cycling even though that should be at the lowest priority. IssueID #244 --- src/ui/widget.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/ui/widget.c') diff --git a/src/ui/widget.c b/src/ui/widget.c index 1ef2360c..3eea761e 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c @@ -906,16 +906,7 @@ static iBool scrollOverflow_Widget_(iWidget *d, int delta) { } iBool processEvent_Widget(iWidget *d, const SDL_Event *ev) { - if (ev->type == SDL_KEYDOWN) { - if (ev->key.keysym.sym == SDLK_TAB) { - setFocus_Widget(findFocusable_Widget(focus_Widget(), - ev->key.keysym.mod & KMOD_SHIFT - ? backward_WidgetFocusDir - : forward_WidgetFocusDir)); - return iTrue; - } - } - else if (d->flags & commandOnClick_WidgetFlag && + if (d->flags & commandOnClick_WidgetFlag && (ev->type == SDL_MOUSEBUTTONDOWN || ev->type == SDL_MOUSEBUTTONUP) && (mouseGrab_Widget() == d || contains_Widget(d, init_I2(ev->button.x, ev->button.y)))) { postCommand_Widget(d, -- cgit v1.2.3