summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorMaxim Baz <github@maximbaz.com>2018-06-13 14:15:31 +0200
committerDave Davenport <DaveDavenport@users.noreply.github.com>2018-06-13 14:15:31 +0200
commitff9b0f5ccd695395f4b7a18ab81426aa54b1b66f (patch)
treefc5ea8e4ddb60c88cbd86cfc2828623fdd0b2208 /source
parentbdb6abef4a2b3cd3c02443038f43af74fd1bc987 (diff)
Add default shortcuts: Shift+BackSpace to delete previous char, Ctrl+Left/Right for word movements (#790)
* Support Shift+BackSpace by default to delete previous char * Support Ctrl+Arrow for word movements
Diffstat (limited to 'source')
-rw-r--r--source/keyb.c6
-rw-r--r--source/widgets/textbox.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/source/keyb.c b/source/keyb.c
index 3f6b85aa..e230984e 100644
--- a/source/keyb.c
+++ b/source/keyb.c
@@ -50,14 +50,14 @@ ActionBindingEntry rofi_bindings[] =
{ .id = CLEAR_LINE, .name = "kb-clear-line", .binding = "Control+w", .comment = "Clear input line" },
{ .id = MOVE_FRONT, .name = "kb-move-front", .binding = "Control+a", .comment = "Beginning of line" },
{ .id = MOVE_END, .name = "kb-move-end", .binding = "Control+e", .comment = "End of line" },
- { .id = MOVE_WORD_BACK, .name = "kb-move-word-back", .binding = "Alt+b", .comment = "Move back one word" },
- { .id = MOVE_WORD_FORWARD, .name = "kb-move-word-forward", .binding = "Alt+f", .comment = "Move forward one word" },
+ { .id = MOVE_WORD_BACK, .name = "kb-move-word-back", .binding = "Alt+b,Control+Left", .comment = "Move back one word" },
+ { .id = MOVE_WORD_FORWARD, .name = "kb-move-word-forward", .binding = "Alt+f,Control+Right", .comment = "Move forward one word" },
{ .id = MOVE_CHAR_BACK, .name = "kb-move-char-back", .binding = "Left,Control+b", .comment = "Move back one char" },
{ .id = MOVE_CHAR_FORWARD, .name = "kb-move-char-forward", .binding = "Right,Control+f", .comment = "Move forward one char" },
{ .id = REMOVE_WORD_BACK, .name = "kb-remove-word-back", .binding = "Control+Alt+h,Control+BackSpace", .comment = "Delete previous word" },
{ .id = REMOVE_WORD_FORWARD, .name = "kb-remove-word-forward", .binding = "Control+Alt+d", .comment = "Delete next word" },
{ .id = REMOVE_CHAR_FORWARD, .name = "kb-remove-char-forward", .binding = "Delete,Control+d", .comment = "Delete next char" },
- { .id = REMOVE_CHAR_BACK, .name = "kb-remove-char-back", .binding = "BackSpace,Control+h", .comment = "Delete previous char" },
+ { .id = REMOVE_CHAR_BACK, .name = "kb-remove-char-back", .binding = "BackSpace,Shift+BackSpace,Control+h", .comment = "Delete previous char" },
{ .id = REMOVE_TO_EOL, .name = "kb-remove-to-eol", .binding = "Control+k", .comment = "Delete till the end of line" },
{ .id = REMOVE_TO_SOL, .name = "kb-remove-to-sol", .binding = "Control+u", .comment = "Delete till the start of line" },
{ .id = ACCEPT_ENTRY, .name = "kb-accept-entry", .binding = "Control+j,Control+m,Return,KP_Enter", .comment = "Accept entry" },
diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c
index 644ef31d..3548a95c 100644
--- a/source/widgets/textbox.c
+++ b/source/widgets/textbox.c
@@ -778,15 +778,15 @@ int textbox_keybinding ( textbox *tb, KeyBindingAction action )
case REMOVE_CHAR_FORWARD:
textbox_cursor_del ( tb );
return 1;
- // Alt-B
+ // Alt-B, Ctrl-Left
case MOVE_WORD_BACK:
textbox_cursor_dec_word ( tb );
return 2;
- // Alt-F
+ // Alt-F, Ctrl-Right
case MOVE_WORD_FORWARD:
textbox_cursor_inc_word ( tb );
return 2;
- // BackSpace, Ctrl-h
+ // BackSpace, Shift-BackSpace, Ctrl-h
case REMOVE_CHAR_BACK:
textbox_cursor_bkspc ( tb );
return 1;