From 26d40241c0028123da13f109ec28bb79a9e14563 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Sun, 3 May 2026 03:05:20 +0900 Subject: [PATCH] cycle: accept Enter to finish window switcher Accept Enter key to finish window switcher and focus the selected window. This follows Openbox's behavior. This is useful when the user binds NextWindow/PreviousWindow to a key without modifiers. --- src/input/keyboard.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/input/keyboard.c b/src/input/keyboard.c index ff38fb0d..680cf6e2 100644 --- a/src/input/keyboard.c +++ b/src/input/keyboard.c @@ -472,6 +472,11 @@ handle_cycle_view_key(struct keyinfo *keyinfo) /* Esc deactivates window switcher */ cycle_finish(/*switch_focus*/ false); return true; + case XKB_KEY_Return: + case XKB_KEY_KP_Enter: + /* Enter accepts the currently selected window */ + cycle_finish(/*switch_focus*/ true); + return true; case XKB_KEY_Up: case XKB_KEY_Left: /* Up/Left cycles the window backward */