summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/tofi.1.md2
-rw-r--r--doc/tofi.1.scd2
-rw-r--r--src/input.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/doc/tofi.1.md b/doc/tofi.1.md
index afd507a..b2cad9b 100644
--- a/doc/tofi.1.md
+++ b/doc/tofi.1.md
@@ -59,7 +59,7 @@ the form **--key=value**.
> Delete line.
-\<Ctrl\>-w
+\<Ctrl\>-w \| <Ctrl\>-\<Backspace\>
> Delete word.
diff --git a/doc/tofi.1.scd b/doc/tofi.1.scd
index 1de0922..f80d5ae 100644
--- a/doc/tofi.1.scd
+++ b/doc/tofi.1.scd
@@ -53,7 +53,7 @@ All config file options described in *tofi*(5) are also accepted, in the form
<Ctrl>-u
Delete line.
-<Ctrl>-w
+<Ctrl>-w | <Ctrl>-<Backspace>
Delete word.
<Enter>
diff --git a/src/input.c b/src/input.c
index 0f69a05..0e1a5f9 100644
--- a/src/input.c
+++ b/src/input.c
@@ -33,21 +33,21 @@ void input_handle_keypress(struct tofi *tofi, xkb_keycode_t keycode)
keycode);
if (utf32_isprint(ch)) {
add_character(tofi, keycode);
- } else if (sym == XKB_KEY_BackSpace) {
- delete_character(tofi);
- } else if (key == KEY_W
+ } else if ((sym == XKB_KEY_BackSpace || key == KEY_W)
&& xkb_state_mod_name_is_active(
tofi->xkb_state,
XKB_MOD_NAME_CTRL,
XKB_STATE_MODS_EFFECTIVE))
{
delete_word(tofi);
+ } else if (sym == XKB_KEY_BackSpace) {
+ delete_character(tofi);
} else if (key == KEY_U
&& xkb_state_mod_name_is_active(
tofi->xkb_state,
XKB_MOD_NAME_CTRL,
XKB_STATE_MODS_EFFECTIVE)
- )
+ )
{
clear_input(tofi);
} else if (sym == XKB_KEY_Up || sym == XKB_KEY_Left || sym == XKB_KEY_ISO_Left_Tab