From 0d188895c3e88f591aa47f7a5c272ad959e5a40d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 8 Mar 2020 15:28:47 +0100 Subject: search: add support for user configurable key bindings No default bindings defined yet, though. --- input.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'input.h') diff --git a/input.h b/input.h index 2483389a..5507a269 100644 --- a/input.h +++ b/input.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include "wayland.h" @@ -8,3 +9,5 @@ extern const struct wl_keyboard_listener keyboard_listener; extern const struct wl_pointer_listener pointer_listener; void input_repeat(struct wayland *wayl, uint32_t key); +void input_execute_binding( + struct terminal *term, enum binding_action action, uint32_t serial); -- cgit v1.3 From 0c72128405919263127f2771de8a7a8561961219 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 9 Mar 2020 19:47:22 +0100 Subject: input: parse_key_binding_for_action: export function --- input.c | 8 ++++---- input.h | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'input.h') diff --git a/input.c b/input.c index 0b8cf213..96de8160 100644 --- a/input.c +++ b/input.c @@ -84,8 +84,8 @@ input_execute_binding(struct terminal *term, enum binding_action action, } } -static bool -parse_key_binding_for_action( +bool +input_parse_key_binding_for_action( struct xkb_keymap *keymap, enum binding_action action, const char *combos, key_binding_list_t *bindings) { @@ -196,11 +196,11 @@ keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, close(fd); for (size_t i = 0; i < BIND_ACTION_COUNT; i++) { - parse_key_binding_for_action( + input_parse_key_binding_for_action( wayl->kbd.xkb_keymap, i, wayl->conf->bindings.key[i], &wayl->kbd.bindings.key); - parse_key_binding_for_action( + input_parse_key_binding_for_action( wayl->kbd.xkb_keymap, i, wayl->conf->bindings.search[i], &wayl->kbd.bindings.search); } diff --git a/input.h b/input.h index 5507a269..9c274964 100644 --- a/input.h +++ b/input.h @@ -9,5 +9,10 @@ extern const struct wl_keyboard_listener keyboard_listener; extern const struct wl_pointer_listener pointer_listener; void input_repeat(struct wayland *wayl, uint32_t key); + +bool input_parse_key_binding_for_action( + struct xkb_keymap *keymap, enum binding_action action, + const char *combos, key_binding_list_t *bindings); + void input_execute_binding( struct terminal *term, enum binding_action action, uint32_t serial); -- cgit v1.3