From c3200836fa3d6f061ab17c63aca5e7dd74b54dbc Mon Sep 17 00:00:00 2001 From: You name Date: Thu, 5 Mar 2026 18:31:52 -0800 Subject: [PATCH] feat: use Tab key to switch between split panes When split view is active (two panes visible), pressing Tab switches focus to the other pane. When split view is not active, Tab behaves normally (GTK default focus traversal). The handler runs before GTK's default key-press processing so that Tab is intercepted before it gets consumed by the focus chain. Inspired by: https://github.com/linuxmint/nemo/pull/3648 --- src/nemo-window.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/nemo-window.c b/src/nemo-window.c index a9e502d72..ce752afa5 100644 --- a/src/nemo-window.c +++ b/src/nemo-window.c @@ -1233,6 +1233,18 @@ nemo_window_key_press_event (GtkWidget *widget, } } + /* Tab switches between split panes when both are visible */ + if (event->keyval == GDK_KEY_Tab && + (event->state & gtk_accelerator_get_default_mod_mask ()) == 0) { + NemoWindowPane *next_pane; + + next_pane = nemo_window_get_next_pane (window); + if (next_pane != NULL) { + nemo_window_pane_grab_focus (next_pane); + return TRUE; + } + } + for (i = 0; i < G_N_ELEMENTS (extra_window_keybindings); i++) { if (extra_window_keybindings[i].keyval == event->keyval) { const GList *action_groups;