From 03337534f920e3bef9e1a5a416ac3a05601dddaf Mon Sep 17 00:00:00 2001 From: Arjan Molenaar Date: Wed, 22 May 2024 11:13:41 +0200 Subject: [PATCH] macos: add keybindings for search next/previous --- gtk/gtksearchentry.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c index 68c8db5abc..02b9ae80d0 100644 --- a/gtk/gtksearchentry.c +++ b/gtk/gtksearchentry.c @@ -648,6 +648,16 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass) NULL, G_TYPE_NONE, 0); +#ifdef __APPLE__ + gtk_widget_class_add_binding_signal (widget_class, + GDK_KEY_g, GDK_META_MASK, + "next-match", + NULL); + gtk_widget_class_add_binding_signal (widget_class, + GDK_KEY_g, GDK_SHIFT_MASK | GDK_META_MASK, + "previous-match", + NULL); +#else gtk_widget_class_add_binding_signal (widget_class, GDK_KEY_g, GDK_CONTROL_MASK, "next-match", @@ -656,6 +666,8 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass) GDK_KEY_g, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "previous-match", NULL); +#endif + gtk_widget_class_add_binding_signal (widget_class, GDK_KEY_Escape, 0, "stop-search",