From 024b235be0aa8a8ec2c495e40b92d4554601efb6 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 17 Jun 2022 10:17:39 +0300 Subject: [PATCH 44/44] gtk: Make numpad keys to work for controlling zoom Reported by elefant See osdn #44846 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/gui_main.c | 2 ++ client/gui-gtk-4.0/gui_main.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/client/gui-gtk-3.22/gui_main.c b/client/gui-gtk-3.22/gui_main.c index 3a1e892a50..5fbe596595 100644 --- a/client/gui-gtk-3.22/gui_main.c +++ b/client/gui-gtk-3.22/gui_main.c @@ -462,10 +462,12 @@ static gboolean key_press_map_canvas(GtkWidget *w, GdkEventKey *ev, if (!(ev->state & GDK_CONTROL_MASK)) { switch (ev->keyval) { case GDK_KEY_plus: + case GDK_KEY_KP_Add: zoom_step_up(); return TRUE; case GDK_KEY_minus: + case GDK_KEY_KP_Subtract: zoom_step_down(); return TRUE; diff --git a/client/gui-gtk-4.0/gui_main.c b/client/gui-gtk-4.0/gui_main.c index cebbad55f4..469d627bf3 100644 --- a/client/gui-gtk-4.0/gui_main.c +++ b/client/gui-gtk-4.0/gui_main.c @@ -429,10 +429,12 @@ static gboolean key_press_map_canvas(guint keyval, GdkModifierType state) if (!(state & GDK_CONTROL_MASK)) { switch (keyval) { case GDK_KEY_plus: + case GDK_KEY_KP_Add: zoom_step_up(); return TRUE; case GDK_KEY_minus: + case GDK_KEY_KP_Subtract: zoom_step_down(); return TRUE; -- 2.35.1