summaryrefslogtreecommitdiff
path: root/src/ui/keys.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-10-30 14:43:35 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-10-30 14:43:40 +0200
commitf22ee7c9ac27fe05649219535a05c21281709607 (patch)
tree549046a2f91e96805cd326efa81749cbc9ca9cda /src/ui/keys.c
parentb1e9b313f6810afbadde0f8079326ecf04c89817 (diff)
Cleanup
Diffstat (limited to 'src/ui/keys.c')
-rw-r--r--src/ui/keys.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ui/keys.c b/src/ui/keys.c
index d46d20bf..4d52b0a4 100644
--- a/src/ui/keys.c
+++ b/src/ui/keys.c
@@ -65,15 +65,14 @@ static void bindDefaults_(void) {
65 bind_Keys("scroll.step arg:-1", SDLK_UP, 0); 65 bind_Keys("scroll.step arg:-1", SDLK_UP, 0);
66 bind_Keys("scroll.step arg:1", SDLK_DOWN, 0); 66 bind_Keys("scroll.step arg:1", SDLK_DOWN, 0);
67 bind_Keys("scroll.page arg:-1", SDLK_PAGEUP, 0); 67 bind_Keys("scroll.page arg:-1", SDLK_PAGEUP, 0);
68 bind_Keys("scroll.page arg:-1", SDLK_SPACE, KMOD_SHIFT);
69 bind_Keys("scroll.page arg:1", SDLK_PAGEDOWN, 0); 68 bind_Keys("scroll.page arg:1", SDLK_PAGEDOWN, 0);
69 bind_Keys("scroll.page arg:-1", SDLK_SPACE, KMOD_SHIFT);
70 bind_Keys("scroll.page arg:1", SDLK_SPACE, 0); 70 bind_Keys("scroll.page arg:1", SDLK_SPACE, 0);
71} 71}
72 72
73static iBinding *find_Keys_(iKeys *d, int key, int mods) { 73static iBinding *find_Keys_(iKeys *d, int key, int mods) {
74 const iBinding bind = { .key = key, .mods = mods };
75 size_t pos; 74 size_t pos;
76 if (locate_SortedArray(&d->bindings, &bind, &pos)) { 75 if (locate_SortedArray(&d->bindings, &(iBinding){ .key = key, .mods = mods }, &pos)) {
77 return at_SortedArray(&d->bindings, pos); 76 return at_SortedArray(&d->bindings, pos);
78 } 77 }
79 return NULL; 78 return NULL;