From 5e68b6902089a7cd50797d8c1feabf36d662a552 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 14 Nov 2009 12:19:19 +0300 Subject: [PATCH] Many shortcuts were fixed. Ticket #1764: * fxed shortcuts for select/unselect/reverse selection of file group; * removed 'C-x C-c' default shortcut for Quit command. Also fixed some emacs-like keybindings for editor and viewer. Signed-off-by: Andrew Borodin --- misc/mc.keymap.default | 2 +- misc/mc.keymap.emacs | 9 ++++----- src/keybind.c | 11 +++++------ src/tty/key.c | 6 +++--- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/misc/mc.keymap.default b/misc/mc.keymap.default index a9f9d0645..56dc2f231 100644 --- a/misc/mc.keymap.default +++ b/misc/mc.keymap.default @@ -233,7 +233,7 @@ CmdCopyOtherPathname = alt-shift-a CmdFilteredView = alt-exclamation CmdSelect = kpplus CmdUnselect = kpminus -CmdReverseSelection = alt-kpasterisk +CmdReverseSelection = kpasterisk ExtMap1 = ctrl-x [main:xmap] diff --git a/misc/mc.keymap.emacs b/misc/mc.keymap.emacs index 36be18761..1148d3f63 100644 --- a/misc/mc.keymap.emacs +++ b/misc/mc.keymap.emacs @@ -60,8 +60,8 @@ EditBeginningOfTextHighlight = ctrl-shift-home EditEndOfTextHighlight = ctrl-shift-end EditBeginPageHighlight = ctrl-shift-pgup EditEndPageHighlight = ctrl-shift-pgdn -EditScrollUpHighlight = -EditScrollDownHighlight = +EditScrollUpHighlight = ctrl-shift-up +EditScrollDownHighlight = ctrl-shift-down EditParagraphUpHighlight = EditParagraphDownHighlight = @@ -170,8 +170,7 @@ ViewGoto = f5 ViewSearch = f7; question; slash ViewToggleMagicMode = f8 ViewToggleNroffMode = f9 -ViewQuit = f3; f10; q; esc; ctrl-g -ViewContinueSearch = ctrl-r; ctrl-s; f17 +ViewContinueSearch = ctrl-r; ctrl-s; f17; n ViewMoveToBol = ctrl-a ViewMoveToEol = ctrl-e ViewMoveLeft = h; left @@ -238,7 +237,7 @@ CmdCopyOtherPathname = alt-shift-a CmdFilteredView = alt-exclamation CmdSelect = kpplus CmdUnselect = kpminus -CmdReverseSelection = alt-kpasterisk +CmdReverseSelection = kpasterisk ExtMap1 = ctrl-x [main:xmap] diff --git a/src/keybind.c b/src/keybind.c index 7c154324f..df67ac2e1 100644 --- a/src/keybind.c +++ b/src/keybind.c @@ -762,8 +762,8 @@ const global_keymap_t default_panel_keymap[] = { { KEY_F (14), CK_PanelCmdEditNew, "S-F4" }, { KEY_F (16), CK_PanelCmdRenameLocal, "S-F6" }, { ALT ('*'), CK_PanelCmdReverseSelection, "M-*" }, - { KEY_KP_ADD, CK_PanelCmdSelect, "Gray+" }, - { KEY_KP_SUBTRACT, CK_PanelCmdUnselect, "Gray-" }, + { KEY_KP_ADD, CK_PanelCmdSelect, "M-+" }, + { KEY_KP_SUBTRACT, CK_PanelCmdUnselect, "M--" }, { KEY_F (13), CK_PanelCmdViewSimple, "S-F3" }, { KEY_M_CTRL | KEY_NPAGE, CK_PanelCtrlNextPage, "C-PgDn" }, { KEY_M_CTRL | KEY_PPAGE, CK_PanelCtrlPrevPage, "C-PgUp" }, @@ -830,14 +830,13 @@ const global_keymap_t default_main_map[] = { { ALT ('.'), CK_ToggleShowHidden, "M-." }, { XCTRL ('x'), CK_StartExtMap1, "C-x" }, /* Select/unselect group */ - { ALT ('*'), CK_SelectCmd, "M-*" }, - { KEY_KP_ADD, CK_UnselectCmd, "Gray+" }, - { KEY_KP_SUBTRACT, CK_ReverseSelectionCmd, "Gray-" }, + { KEY_KP_ADD, CK_SelectCmd, "+" }, + { KEY_KP_SUBTRACT, CK_UnselectCmd, "-" }, + { ALT ('*'), CK_ReverseSelectionCmd, "*" }, { 0, CK_Ignore_Key, "" } }; const global_keymap_t default_main_x_map[] = { - { XCTRL ('c'), CK_QuitCmd, "C-c" }, { 'd', CK_CompareDirsCmd, "d" }, #ifdef USE_VFS { 'a', CK_ReselectVfs, "a"}, diff --git a/src/tty/key.c b/src/tty/key.c index f4eda9af9..f5ce4e482 100644 --- a/src/tty/key.c +++ b/src/tty/key.c @@ -128,10 +128,10 @@ const key_code_name_t key_name_conv_tab[] = { { KEY_IC, "insert", N_("Insert key"), "Ins" }, { KEY_DC, "delete", N_("Delete key"), "Del" }, { ALT ('\t'), "complete", N_("Completion/M-tab"), "Meta-Tab" }, - { KEY_KP_ADD, "kpplus", N_("+ on keypad"), "Gray+" }, - { KEY_KP_SUBTRACT, "kpminus", N_("- on keypad"), "Gray-" }, + { KEY_KP_ADD, "kpplus", N_("+ on keypad"), "+" }, + { KEY_KP_SUBTRACT, "kpminus", N_("- on keypad"), "-" }, { (int) '/', "kpslash", N_("Slash on keypad"), "/" }, - { KEY_KP_MULTIPLY, "kpasterisk", N_("* on keypad"), "Gray*" }, + { KEY_KP_MULTIPLY, "kpasterisk", N_("* on keypad"), "*" }, /* From here on, these won't be shown in Learn keys (no space) */ { ESC_CHAR, "escape", N_("Escape key"), "Esc" },