summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-10 14:27:20 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-10 14:27:20 +0300
commit44b1f58bb25817d2bc4578e727ce637752d00299 (patch)
tree9e5be8932a15ebafa97cac5888b31087e33ea090 /src/app.c
parent963ad5fad6905a94c077246b8045e139e1139fc8 (diff)
Allow using Tab key for bindings
Tab was always consumed by focus cycling even though that should be at the lowest priority. IssueID #244
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index 2ccadca8..d8053315 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1023,6 +1023,16 @@ void processEvents_App(enum iAppEventMode eventMode) {
1023 /* There may be a key bindings for this. */ 1023 /* There may be a key bindings for this. */
1024 wasUsed = processEvent_Keys(&ev); 1024 wasUsed = processEvent_Keys(&ev);
1025 } 1025 }
1026 if (!wasUsed) {
1027 /* Focus cycling. */
1028 if (ev.type == SDL_KEYDOWN && ev.key.keysym.sym == SDLK_TAB) {
1029 setFocus_Widget(findFocusable_Widget(focus_Widget(),
1030 ev.key.keysym.mod & KMOD_SHIFT
1031 ? backward_WidgetFocusDir
1032 : forward_WidgetFocusDir));
1033 wasUsed = iTrue;
1034 }
1035 }
1026 if (ev.type == SDL_USEREVENT && ev.user.code == command_UserEventCode) { 1036 if (ev.type == SDL_USEREVENT && ev.user.code == command_UserEventCode) {
1027#if defined (iPlatformAppleDesktop) 1037#if defined (iPlatformAppleDesktop)
1028 handleCommand_MacOS(command_UserEvent(&ev)); 1038 handleCommand_MacOS(command_UserEvent(&ev));