Skip to content

Instantly share code, notes, and snippets.

@haselwarter
Created February 11, 2022 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haselwarter/12680e428ea1c8a35670085591f3a618 to your computer and use it in GitHub Desktop.
Save haselwarter/12680e428ea1c8a35670085591f3a618 to your computer and use it in GitHub Desktop.
commit 4167767b45324c70a0f30abbb95f7ac616558b7a
Author: Philipp G. Haselwarter <philipp@haselwarter.org>
Date: Fri Feb 11 23:38:00 2022 +0100
Bind ctrl-m (^M) to act like Return, i.e. accept the current entry
diff --git a/wayland.c b/wayland.c
index 4bf93be..3dda551 100644
--- a/wayland.c
+++ b/wayland.c
@@ -630,7 +630,8 @@ keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
}
}
- else if (sym == XKB_KEY_Return && effective_mods == 0)
+ else if ((sym == XKB_KEY_Return && effective_mods == 0) ||
+ (sym == XKB_KEY_m && effective_mods == ctrl))
execute_selected(wayl);
else if (effective_mods == 0) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment