From 729e56dccca8d480dccaf4ea286eed5adc2e0a8f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 23 Jan 2022 14:26:50 +0000 Subject: [PATCH] GTK: Add support for word left/right keybindings. --- frontends/gtk/gui.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c index 76bbd99ac..fa9c9cf2c 100644 --- a/frontends/gtk/gui.c +++ b/frontends/gtk/gui.c @@ -152,10 +152,14 @@ uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key) case GDK_KEY(Left): case GDK_KEY(KP_Left): + if (key->state & GDK_CONTROL_MASK) + return NS_KEY_WORD_LEFT; return NS_KEY_LEFT; case GDK_KEY(Right): case GDK_KEY(KP_Right): + if (key->state & GDK_CONTROL_MASK) + return NS_KEY_WORD_RIGHT; return NS_KEY_RIGHT; case GDK_KEY(Up):