Skip to contentSkip to conversation

ui/sdl2: fix reset scaling binding to be consistent with gtk

PATCH In review Nir Lichtman 2 participants 2 messages Sep 10, 2025 – Sep 19, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ui/sdl2: fix reset scaling binding to be consistent with gtk

Problem: Currently the reset scaling hotkey is inconsistent between SDL and GTK graphics modes.

Solution: Fix SDL to use MOD+0 instead of MOD+u which is in line with GTK and generally more consistent with other apps.

This is also related to my previously sent patch fixing the docs.

---
 ui/sdl2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ui/sdl2.c +1 -1
index b00e421..032dc14 100644
@@ -421,7 +421,7 @@ static void handle_keydown(SDL_Event *ev)
                 sdl_grab_end(scon);
             }
             break;
-        case SDL_SCANCODE_U:
+        case SDL_SCANCODE_0:
             sdl2_window_resize(scon);
             if (!scon->opengl) {
                 /* re-create scon->texture */
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Nir Lichtman

Problem: Currently the reset scaling hotkey is inconsistent between SDL and GTK graphics modes.

Solution: Fix SDL to use MOD+0 instead of MOD+u which is in line with GTK and generally more consistent with other apps.

This is also related to my previously sent patch fixing the docs.

---
  ui/sdl2.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
ui/sdl2.c +0 -0
index b00e421..032dc14 100644

ui/sdl2.c static void handle_keydown(SDL_Event *ev) · line 427

Quoted 8 lines
ui/sdl2.c +1 -1
@@ -421,7 +421,7 @@ static void handle_keydown(SDL_Event *ev)
                  sdl_grab_end(scon);
              }
              break;
-        case SDL_SCANCODE_U:
+        case SDL_SCANCODE_0:
              sdl2_window_resize(scon);
              if (!scon->opengl) {
                  /* re-create scon->texture */