From 680b9a8220323eaef12e1118a9e40456661eebfa Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 28 Nov 2010 16:16:05 +0300 Subject: [PATCH] Ticket #2432: backspace key doesn't work in input lines. Also added default bindings for C-d and C-h keys in editor and input lines. Signed-off-by: Andrew Borodin --- misc/mc.keymap.default | 4 ++-- src/keybind-defaults.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/misc/mc.keymap.default b/misc/mc.keymap.default index 8e9f158ce..8ec726078 100644 --- a/misc/mc.keymap.default +++ b/misc/mc.keymap.default @@ -323,8 +323,8 @@ InputMoveRight = right; alt-right InputWordRight = ctrl-right InputForwardChar = ctrl-f InputForwardWord = alt-f -InputBackwardDelete = backspace -InputDeleteChar = delete +InputBackwardDelete = backspace; ctrl-h +InputDeleteChar = delete; ctrl-d InputKillWord = alt-d InputBackwardKillWord = alt-backspace InputSetMark = diff --git a/src/keybind-defaults.c b/src/keybind-defaults.c index 618064ebf..e6c88691c 100644 --- a/src/keybind-defaults.c +++ b/src/keybind-defaults.c @@ -250,7 +250,9 @@ const global_keymap_t default_editor_keymap[] = { {ESC_CHAR, CK_Quit, "Esc"}, {KEY_BACKSPACE, CK_BackSpace, "BackSpace"}, + {KEY_BACKSPACE, CK_BackSpace, "C-h"}, {KEY_DC, CK_Delete, "Delete"}, + {KEY_DC, CK_Delete, "C-d"}, {KEY_DOWN, CK_Down, "Down"}, {KEY_END, CK_End, "End"}, {KEY_HOME, CK_Home, "Home"}, @@ -607,7 +609,9 @@ const global_keymap_t default_input_keymap[] = { /* Editing */ {KEY_BACKSPACE, CK_InputBackwardDelete, "BackSpace"}, + {KEY_BACKSPACE, CK_InputBackwardDelete, "C-h"}, {KEY_DC, CK_InputDeleteChar, "Delete"}, + {KEY_DC, CK_InputDeleteChar, "C-d"}, {ALT ('d'), CK_InputKillWord, "M-d"}, {ALT (KEY_BACKSPACE), CK_InputBackwardKillWord, "M-BackSpace"},