From 63f3a9b705066f5929cb3e5d357f5de6aa17a823 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sun, 30 Apr 2023 19:48:22 +0100 Subject: Add Ctrl-O keybinding. --- doc/tofi.1.scd | 2 +- src/input.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/tofi.1.scd b/doc/tofi.1.scd index 35661a1..87bee2c 100644 --- a/doc/tofi.1.scd +++ b/doc/tofi.1.scd @@ -59,7 +59,7 @@ All config file options described in *tofi*(5) are also accepted, in the form Confirm the current selection and quit. - + | -c | -o Quit without making a selection. # FILES diff --git a/src/input.c b/src/input.c index ad89dbd..018761f 100644 --- a/src/input.c +++ b/src/input.c @@ -101,6 +101,12 @@ void input_handle_keypress(struct tofi *tofi, xkb_keycode_t keycode) XKB_MOD_NAME_CTRL, XKB_STATE_MODS_EFFECTIVE) ) + || (key == KEY_O + && xkb_state_mod_name_is_active( + tofi->xkb_state, + XKB_MOD_NAME_CTRL, + XKB_STATE_MODS_EFFECTIVE) + ) ) { tofi->closed = true; -- cgit v1.2.3