diff --git a/lib/keybind.c b/lib/keybind.c index cd4a35db4..abd44d3e2 100644 --- a/lib/keybind.c +++ b/lib/keybind.c @@ -7,7 +7,7 @@ Written by: Vitja Makarov, 2005 Ilia Maslakov , 2009, 2012 - Andrew Borodin , 2009, 2010, 2011, 2012 + Andrew Borodin , 2009-2020 This file is part of the Midnight Commander. @@ -40,333 +40,336 @@ /*** file scope macro definitions ****************************************************************/ +#define ADD_KEYMAP_NAME(name) \ + { #name, CK_##name } + /*** file scope type declarations ****************************************************************/ /*** file scope variables ************************************************************************/ static name_keymap_t command_names[] = { /* common */ - {"InsertChar", CK_InsertChar}, - {"Enter", CK_Enter}, - {"ChangePanel", CK_ChangePanel}, - {"Up", CK_Up}, - {"Down", CK_Down}, - {"Left", CK_Left}, - {"Right", CK_Right}, - {"LeftQuick", CK_LeftQuick}, - {"RightQuick", CK_RightQuick}, - {"Home", CK_Home}, - {"End", CK_End}, - {"PageUp", CK_PageUp}, - {"PageDown", CK_PageDown}, - {"HalfPageUp", CK_HalfPageUp}, - {"HalfPageDown", CK_HalfPageDown}, - {"Top", CK_Top}, - {"Bottom", CK_Bottom}, - {"TopOnScreen", CK_TopOnScreen}, - {"MiddleOnScreen", CK_MiddleOnScreen}, - {"BottomOnScreen", CK_BottomOnScreen}, - {"WordLeft", CK_WordLeft}, - {"WordRight", CK_WordRight}, - {"Copy", CK_Copy}, - {"Move", CK_Move}, - {"Delete", CK_Delete}, - {"MakeDir", CK_MakeDir}, - {"ChangeMode", CK_ChangeMode}, - {"ChangeOwn", CK_ChangeOwn}, - {"ChangeOwnAdvanced", CK_ChangeOwnAdvanced}, + ADD_KEYMAP_NAME (InsertChar), + ADD_KEYMAP_NAME (Enter), + ADD_KEYMAP_NAME (ChangePanel), + ADD_KEYMAP_NAME (Up), + ADD_KEYMAP_NAME (Down), + ADD_KEYMAP_NAME (Left), + ADD_KEYMAP_NAME (Right), + ADD_KEYMAP_NAME (LeftQuick), + ADD_KEYMAP_NAME (RightQuick), + ADD_KEYMAP_NAME (Home), + ADD_KEYMAP_NAME (End), + ADD_KEYMAP_NAME (PageUp), + ADD_KEYMAP_NAME (PageDown), + ADD_KEYMAP_NAME (HalfPageUp), + ADD_KEYMAP_NAME (HalfPageDown), + ADD_KEYMAP_NAME (Top), + ADD_KEYMAP_NAME (Bottom), + ADD_KEYMAP_NAME (TopOnScreen), + ADD_KEYMAP_NAME (MiddleOnScreen), + ADD_KEYMAP_NAME (BottomOnScreen), + ADD_KEYMAP_NAME (WordLeft), + ADD_KEYMAP_NAME (WordRight), + ADD_KEYMAP_NAME (Copy), + ADD_KEYMAP_NAME (Move), + ADD_KEYMAP_NAME (Delete), + ADD_KEYMAP_NAME (MakeDir), + ADD_KEYMAP_NAME (ChangeMode), + ADD_KEYMAP_NAME (ChangeOwn), + ADD_KEYMAP_NAME (ChangeOwnAdvanced), #ifdef ENABLE_EXT2FS_ATTR - {"ChangeAttributes", CK_ChangeAttributes}, + ADD_KEYMAP_NAME (ChangeAttributes), #endif - {"Remove", CK_Remove}, - {"BackSpace", CK_BackSpace}, - {"Redo", CK_Redo}, - {"Clear", CK_Clear}, - {"Menu", CK_Menu}, - {"MenuLastSelected", CK_MenuLastSelected}, - {"UserMenu", CK_UserMenu}, - {"EditUserMenu", CK_EditUserMenu}, - {"Search", CK_Search}, - {"SearchContinue", CK_SearchContinue}, - {"Replace", CK_Replace}, - {"ReplaceContinue", CK_ReplaceContinue}, - {"Help", CK_Help}, - {"Shell", CK_Shell}, - {"Edit", CK_Edit}, - {"EditNew", CK_EditNew}, + ADD_KEYMAP_NAME (Remove), + ADD_KEYMAP_NAME (BackSpace), + ADD_KEYMAP_NAME (Redo), + ADD_KEYMAP_NAME (Clear), + ADD_KEYMAP_NAME (Menu), + ADD_KEYMAP_NAME (MenuLastSelected), + ADD_KEYMAP_NAME (UserMenu), + ADD_KEYMAP_NAME (EditUserMenu), + ADD_KEYMAP_NAME (Search), + ADD_KEYMAP_NAME (SearchContinue), + ADD_KEYMAP_NAME (Replace), + ADD_KEYMAP_NAME (ReplaceContinue), + ADD_KEYMAP_NAME (Help), + ADD_KEYMAP_NAME (Shell), + ADD_KEYMAP_NAME (Edit), + ADD_KEYMAP_NAME (EditNew), #ifdef HAVE_CHARSET - {"SelectCodepage", CK_SelectCodepage}, + ADD_KEYMAP_NAME (SelectCodepage), #endif - {"EditorViewerHistory", CK_EditorViewerHistory}, - {"History", CK_History}, - {"HistoryNext", CK_HistoryNext}, - {"HistoryPrev", CK_HistoryPrev}, - {"Complete", CK_Complete}, - {"Save", CK_Save}, - {"SaveAs", CK_SaveAs}, - {"Goto", CK_Goto}, - {"Reread", CK_Reread}, - {"Refresh", CK_Refresh}, - {"Suspend", CK_Suspend}, - {"Swap", CK_Swap}, - {"HotList", CK_HotList}, - {"SelectInvert", CK_SelectInvert}, - {"ScreenList", CK_ScreenList}, - {"ScreenNext", CK_ScreenNext}, - {"ScreenPrev", CK_ScreenPrev}, - {"FileNext", CK_FileNext}, - {"FilePrev", CK_FilePrev}, - {"DeleteToHome", CK_DeleteToHome}, - {"DeleteToEnd", CK_DeleteToEnd}, - {"DeleteToWordBegin", CK_DeleteToWordBegin}, - {"DeleteToWordEnd", CK_DeleteToWordEnd}, - {"Cut", CK_Cut}, - {"Store", CK_Store}, - {"Paste", CK_Paste}, - {"Mark", CK_Mark}, - {"MarkLeft", CK_MarkLeft}, - {"MarkRight", CK_MarkRight}, - {"MarkUp", CK_MarkUp}, - {"MarkDown", CK_MarkDown}, - {"MarkToWordBegin", CK_MarkToWordBegin}, - {"MarkToWordEnd", CK_MarkToWordEnd}, - {"MarkToHome", CK_MarkToHome}, - {"MarkToEnd", CK_MarkToEnd}, - {"ToggleNavigation", CK_ToggleNavigation}, - {"Sort", CK_Sort}, - {"Options", CK_Options}, - {"LearnKeys", CK_LearnKeys}, - {"Bookmark", CK_Bookmark}, - {"Quit", CK_Quit}, - {"QuitQuiet", CK_QuitQuiet}, - {"ExtendedKeyMap", CK_ExtendedKeyMap}, + ADD_KEYMAP_NAME (EditorViewerHistory), + ADD_KEYMAP_NAME (History), + ADD_KEYMAP_NAME (HistoryNext), + ADD_KEYMAP_NAME (HistoryPrev), + ADD_KEYMAP_NAME (Complete), + ADD_KEYMAP_NAME (Save), + ADD_KEYMAP_NAME (SaveAs), + ADD_KEYMAP_NAME (Goto), + ADD_KEYMAP_NAME (Reread), + ADD_KEYMAP_NAME (Refresh), + ADD_KEYMAP_NAME (Suspend), + ADD_KEYMAP_NAME (Swap), + ADD_KEYMAP_NAME (HotList), + ADD_KEYMAP_NAME (SelectInvert), + ADD_KEYMAP_NAME (ScreenList), + ADD_KEYMAP_NAME (ScreenNext), + ADD_KEYMAP_NAME (ScreenPrev), + ADD_KEYMAP_NAME (FileNext), + ADD_KEYMAP_NAME (FilePrev), + ADD_KEYMAP_NAME (DeleteToHome), + ADD_KEYMAP_NAME (DeleteToEnd), + ADD_KEYMAP_NAME (DeleteToWordBegin), + ADD_KEYMAP_NAME (DeleteToWordEnd), + ADD_KEYMAP_NAME (Cut), + ADD_KEYMAP_NAME (Store), + ADD_KEYMAP_NAME (Paste), + ADD_KEYMAP_NAME (Mark), + ADD_KEYMAP_NAME (MarkLeft), + ADD_KEYMAP_NAME (MarkRight), + ADD_KEYMAP_NAME (MarkUp), + ADD_KEYMAP_NAME (MarkDown), + ADD_KEYMAP_NAME (MarkToWordBegin), + ADD_KEYMAP_NAME (MarkToWordEnd), + ADD_KEYMAP_NAME (MarkToHome), + ADD_KEYMAP_NAME (MarkToEnd), + ADD_KEYMAP_NAME (ToggleNavigation), + ADD_KEYMAP_NAME (Sort), + ADD_KEYMAP_NAME (Options), + ADD_KEYMAP_NAME (LearnKeys), + ADD_KEYMAP_NAME (Bookmark), + ADD_KEYMAP_NAME (Quit), + ADD_KEYMAP_NAME (QuitQuiet), + ADD_KEYMAP_NAME (ExtendedKeyMap), /* main commands */ #ifdef USE_INTERNAL_EDIT - {"EditForceInternal", CK_EditForceInternal}, + ADD_KEYMAP_NAME (EditForceInternal), #endif - {"View", CK_View}, - {"ViewRaw", CK_ViewRaw}, - {"ViewFile", CK_ViewFile}, - {"ViewFiltered", CK_ViewFiltered}, - {"Find", CK_Find}, - {"DirSize", CK_DirSize}, - {"CompareDirs", CK_CompareDirs}, + ADD_KEYMAP_NAME (View), + ADD_KEYMAP_NAME (ViewRaw), + ADD_KEYMAP_NAME (ViewFile), + ADD_KEYMAP_NAME (ViewFiltered), + ADD_KEYMAP_NAME (Find), + ADD_KEYMAP_NAME (DirSize), + ADD_KEYMAP_NAME (CompareDirs), #ifdef USE_DIFF_VIEW - {"CompareFiles", CK_CompareFiles}, + ADD_KEYMAP_NAME (CompareFiles), #endif - {"OptionsVfs", CK_OptionsVfs}, - {"OptionsConfirm", CK_OptionsConfirm}, - {"OptionsDisplayBits", CK_OptionsDisplayBits}, - {"EditExtensionsFile", CK_EditExtensionsFile}, - {"EditFileHighlightFile", CK_EditFileHighlightFile}, - {"LinkSymbolicEdit", CK_LinkSymbolicEdit}, - {"ExternalPanelize", CK_ExternalPanelize}, - {"Filter", CK_Filter}, + ADD_KEYMAP_NAME (OptionsVfs), + ADD_KEYMAP_NAME (OptionsConfirm), + ADD_KEYMAP_NAME (OptionsDisplayBits), + ADD_KEYMAP_NAME (EditExtensionsFile), + ADD_KEYMAP_NAME (EditFileHighlightFile), + ADD_KEYMAP_NAME (LinkSymbolicEdit), + ADD_KEYMAP_NAME (ExternalPanelize), + ADD_KEYMAP_NAME (Filter), #ifdef ENABLE_VFS_FISH - {"ConnectFish", CK_ConnectFish}, + ADD_KEYMAP_NAME (ConnectFish), #endif #ifdef ENABLE_VFS_FTP - {"ConnectFtp", CK_ConnectFtp}, + ADD_KEYMAP_NAME (ConnectFtp), #endif #ifdef ENABLE_VFS_SFTP - {"ConnectSftp", CK_ConnectSftp}, + ADD_KEYMAP_NAME (ConnectSftp), #endif #ifdef ENABLE_VFS_SMB - {"ConnectSmb", CK_ConnectSmb}, + ADD_KEYMAP_NAME (ConnectSmb), #endif - {"PanelInfo", CK_PanelInfo}, + ADD_KEYMAP_NAME (PanelInfo), #ifdef ENABLE_BACKGROUND - {"Jobs", CK_Jobs}, + ADD_KEYMAP_NAME (Jobs), #endif - {"OptionsLayout", CK_OptionsLayout}, - {"OptionsAppearance", CK_OptionsAppearance}, - {"Link", CK_Link}, - {"SetupListingFormat", CK_SetupListingFormat}, - {"PanelListing", CK_PanelListing}, + ADD_KEYMAP_NAME (OptionsLayout), + ADD_KEYMAP_NAME (OptionsAppearance), + ADD_KEYMAP_NAME (Link), + ADD_KEYMAP_NAME (SetupListingFormat), + ADD_KEYMAP_NAME (PanelListing), #ifdef LISTMODE_EDITOR - {"ListMode", CK_ListMode}. + ADD_KEYMAP_NAME (ListMode), #endif - {"OptionsPanel", CK_OptionsPanel}, - {"CdQuick", CK_CdQuick}, - {"PanelQuickView", CK_PanelQuickView}, - {"LinkSymbolicRelative", CK_LinkSymbolicRelative}, - {"VfsList", CK_VfsList}, - {"SaveSetup", CK_SaveSetup}, - {"LinkSymbolic", CK_LinkSymbolic}, - {"PanelTree", CK_PanelTree}, - {"Tree", CK_Tree}, + ADD_KEYMAP_NAME (OptionsPanel), + ADD_KEYMAP_NAME (CdQuick), + ADD_KEYMAP_NAME (PanelQuickView), + ADD_KEYMAP_NAME (LinkSymbolicRelative), + ADD_KEYMAP_NAME (VfsList), + ADD_KEYMAP_NAME (SaveSetup), + ADD_KEYMAP_NAME (LinkSymbolic), + ADD_KEYMAP_NAME (PanelTree), + ADD_KEYMAP_NAME (Tree), #ifdef ENABLE_VFS_UNDELFS - {"Undelete", CK_Undelete}, + ADD_KEYMAP_NAME (Undelete), #endif - {"PutCurrentLink", CK_PutCurrentLink}, - {"PutOtherLink", CK_PutOtherLink}, - {"HotListAdd", CK_HotListAdd}, - {"ShowHidden", CK_ShowHidden}, - {"SplitVertHoriz", CK_SplitVertHoriz}, - {"SplitEqual", CK_SplitEqual}, - {"SplitMore", CK_SplitMore}, - {"SplitLess", CK_SplitLess}, - {"PutCurrentPath", CK_PutCurrentPath}, - {"PutOtherPath", CK_PutOtherPath}, - {"PutCurrentSelected", CK_PutCurrentSelected}, - {"PutCurrentFullSelected", CK_PutCurrentFullSelected}, - {"PutCurrentTagged", CK_PutCurrentTagged}, - {"PutOtherTagged", CK_PutOtherTagged}, - {"Select", CK_Select}, - {"Unselect", CK_Unselect}, + ADD_KEYMAP_NAME (PutCurrentLink), + ADD_KEYMAP_NAME (PutOtherLink), + ADD_KEYMAP_NAME (HotListAdd), + ADD_KEYMAP_NAME (ShowHidden), + ADD_KEYMAP_NAME (SplitVertHoriz), + ADD_KEYMAP_NAME (SplitEqual), + ADD_KEYMAP_NAME (SplitMore), + ADD_KEYMAP_NAME (SplitLess), + ADD_KEYMAP_NAME (PutCurrentPath), + ADD_KEYMAP_NAME (PutOtherPath), + ADD_KEYMAP_NAME (PutCurrentSelected), + ADD_KEYMAP_NAME (PutCurrentFullSelected), + ADD_KEYMAP_NAME (PutCurrentTagged), + ADD_KEYMAP_NAME (PutOtherTagged), + ADD_KEYMAP_NAME (Select), + ADD_KEYMAP_NAME (Unselect), /* panel */ - {"SelectExt", CK_SelectExt}, - {"ScrollLeft", CK_ScrollLeft}, - {"ScrollRight", CK_ScrollRight}, - {"PanelOtherCd", CK_PanelOtherCd}, - {"PanelOtherCdLink", CK_PanelOtherCdLink}, - {"CopySingle", CK_CopySingle}, - {"MoveSingle", CK_MoveSingle}, - {"DeleteSingle", CK_DeleteSingle}, - {"CdParent", CK_CdParent}, - {"CdChild", CK_CdChild}, - {"Panelize", CK_Panelize}, - {"PanelOtherSync", CK_PanelOtherSync}, - {"SortNext", CK_SortNext}, - {"SortPrev", CK_SortPrev}, - {"SortReverse", CK_SortReverse}, - {"SortByName", CK_SortByName}, - {"SortByExt", CK_SortByExt}, - {"SortBySize", CK_SortBySize}, - {"SortByMTime", CK_SortByMTime}, - {"CdParentSmart", CK_CdParentSmart}, - {"CycleListingFormat", CK_CycleListingFormat}, + ADD_KEYMAP_NAME (SelectExt), + ADD_KEYMAP_NAME (ScrollLeft), + ADD_KEYMAP_NAME (ScrollRight), + ADD_KEYMAP_NAME (PanelOtherCd), + ADD_KEYMAP_NAME (PanelOtherCdLink), + ADD_KEYMAP_NAME (CopySingle), + ADD_KEYMAP_NAME (MoveSingle), + ADD_KEYMAP_NAME (DeleteSingle), + ADD_KEYMAP_NAME (CdParent), + ADD_KEYMAP_NAME (CdChild), + ADD_KEYMAP_NAME (Panelize), + ADD_KEYMAP_NAME (PanelOtherSync), + ADD_KEYMAP_NAME (SortNext), + ADD_KEYMAP_NAME (SortPrev), + ADD_KEYMAP_NAME (SortReverse), + ADD_KEYMAP_NAME (SortByName), + ADD_KEYMAP_NAME (SortByExt), + ADD_KEYMAP_NAME (SortBySize), + ADD_KEYMAP_NAME (SortByMTime), + ADD_KEYMAP_NAME (CdParentSmart), + ADD_KEYMAP_NAME (CycleListingFormat), /* dialog */ - {"Ok", CK_Ok}, - {"Cancel", CK_Cancel}, + ADD_KEYMAP_NAME (Ok), + ADD_KEYMAP_NAME (Cancel), /* input line */ - {"Yank", CK_Yank}, + ADD_KEYMAP_NAME (Yank), /* help */ - {"Index", CK_Index}, - {"Back", CK_Back}, - {"LinkNext", CK_LinkNext}, - {"LinkPrev", CK_LinkPrev}, - {"NodeNext", CK_NodeNext}, - {"NodePrev", CK_NodePrev}, + ADD_KEYMAP_NAME (Index), + ADD_KEYMAP_NAME (Back), + ADD_KEYMAP_NAME (LinkNext), + ADD_KEYMAP_NAME (LinkPrev), + ADD_KEYMAP_NAME (NodeNext), + ADD_KEYMAP_NAME (NodePrev), /* tree */ - {"Forget", CK_Forget}, + ADD_KEYMAP_NAME (Forget), #if defined (USE_INTERNAL_EDIT) || defined (USE_DIFF_VIEW) - {"ShowNumbers", CK_ShowNumbers}, + ADD_KEYMAP_NAME (ShowNumbers), #endif /* chattr dialog */ - {"MarkAndDown", CK_MarkAndDown}, + ADD_KEYMAP_NAME (MarkAndDown), #ifdef USE_INTERNAL_EDIT - {"Close", CK_Close}, - {"Tab", CK_Tab}, - {"Undo", CK_Undo}, - {"ScrollUp", CK_ScrollUp}, - {"ScrollDown", CK_ScrollDown}, - {"Return", CK_Return}, - {"ParagraphUp", CK_ParagraphUp}, - {"ParagraphDown", CK_ParagraphDown}, - {"EditFile", CK_EditFile}, - {"MarkWord", CK_MarkWord}, - {"MarkLine", CK_MarkLine}, - {"MarkAll", CK_MarkAll}, - {"Unmark", CK_Unmark}, - {"MarkColumn", CK_MarkColumn}, - {"BlockSave", CK_BlockSave}, - {"InsertFile", CK_InsertFile}, - {"InsertOverwrite", CK_InsertOverwrite}, - {"Date", CK_Date}, - {"DeleteLine", CK_DeleteLine}, - {"EditMail", CK_Mail}, - {"ParagraphFormat", CK_ParagraphFormat}, - {"MatchBracket", CK_MatchBracket}, - {"ExternalCommand", CK_ExternalCommand}, - {"MacroStartRecord", CK_MacroStartRecord}, - {"MacroStopRecord", CK_MacroStopRecord}, - {"MacroStartStopRecord", CK_MacroStartStopRecord}, - {"MacroDelete", CK_MacroDelete}, - {"RepeatStartStopRecord", CK_RepeatStartStopRecord}, + ADD_KEYMAP_NAME (Close), + ADD_KEYMAP_NAME (Tab), + ADD_KEYMAP_NAME (Undo), + ADD_KEYMAP_NAME (ScrollUp), + ADD_KEYMAP_NAME (ScrollDown), + ADD_KEYMAP_NAME (Return), + ADD_KEYMAP_NAME (ParagraphUp), + ADD_KEYMAP_NAME (ParagraphDown), + ADD_KEYMAP_NAME (EditFile), + ADD_KEYMAP_NAME (MarkWord), + ADD_KEYMAP_NAME (MarkLine), + ADD_KEYMAP_NAME (MarkAll), + ADD_KEYMAP_NAME (Unmark), + ADD_KEYMAP_NAME (MarkColumn), + ADD_KEYMAP_NAME (BlockSave), + ADD_KEYMAP_NAME (InsertFile), + ADD_KEYMAP_NAME (InsertOverwrite), + ADD_KEYMAP_NAME (Date), + ADD_KEYMAP_NAME (DeleteLine), + ADD_KEYMAP_NAME (EditMail), + ADD_KEYMAP_NAME (ParagraphFormat), + ADD_KEYMAP_NAME (MatchBracket), + ADD_KEYMAP_NAME (ExternalCommand), + ADD_KEYMAP_NAME (MacroStartRecord), + ADD_KEYMAP_NAME (MacroStopRecord), + ADD_KEYMAP_NAME (MacroStartStopRecord), + ADD_KEYMAP_NAME (MacroDelete), + ADD_KEYMAP_NAME (RepeatStartStopRecord), #ifdef HAVE_ASPELL - {"SpellCheck", CK_SpellCheck}, - {"SpellCheckCurrentWord", CK_SpellCheckCurrentWord}, - {"SpellCheckSelectLang", CK_SpellCheckSelectLang}, + ADD_KEYMAP_NAME (SpellCheck), + ADD_KEYMAP_NAME (SpellCheckCurrentWord), + ADD_KEYMAP_NAME (SpellCheckSelectLang), #endif /* HAVE_ASPELL */ - {"BookmarkFlush", CK_BookmarkFlush}, - {"BookmarkNext", CK_BookmarkNext}, - {"BookmarkPrev", CK_BookmarkPrev}, - {"MarkPageUp", CK_MarkPageUp}, - {"MarkPageDown", CK_MarkPageDown}, - {"MarkToFileBegin", CK_MarkToFileBegin}, - {"MarkToFileEnd", CK_MarkToFileEnd}, - {"MarkToPageBegin", CK_MarkToPageBegin}, - {"MarkToPageEnd", CK_MarkToPageEnd}, - {"MarkScrollUp", CK_MarkScrollUp}, - {"MarkScrollDown", CK_MarkScrollDown}, - {"MarkParagraphUp", CK_MarkParagraphUp}, - {"MarkParagraphDown", CK_MarkParagraphDown}, - {"MarkColumnPageUp", CK_MarkColumnPageUp}, - {"MarkColumnPageDown", CK_MarkColumnPageDown}, - {"MarkColumnLeft", CK_MarkColumnLeft}, - {"MarkColumnRight", CK_MarkColumnRight}, - {"MarkColumnUp", CK_MarkColumnUp}, - {"MarkColumnDown", CK_MarkColumnDown}, - {"MarkColumnScrollUp", CK_MarkColumnScrollUp}, - {"MarkColumnScrollDown", CK_MarkColumnScrollDown}, - {"MarkColumnParagraphUp", CK_MarkColumnParagraphUp}, - {"MarkColumnParagraphDown", CK_MarkColumnParagraphDown}, - {"BlockShiftLeft", CK_BlockShiftLeft}, - {"BlockShiftRight", CK_BlockShiftRight}, - {"InsertLiteral", CK_InsertLiteral}, - {"ShowTabTws", CK_ShowTabTws}, - {"SyntaxOnOff", CK_SyntaxOnOff}, - {"SyntaxChoose", CK_SyntaxChoose}, - {"ShowMargin", CK_ShowMargin}, - {"OptionsSaveMode", CK_OptionsSaveMode}, - {"About", CK_About}, + ADD_KEYMAP_NAME (BookmarkFlush), + ADD_KEYMAP_NAME (BookmarkNext), + ADD_KEYMAP_NAME (BookmarkPrev), + ADD_KEYMAP_NAME (MarkPageUp), + ADD_KEYMAP_NAME (MarkPageDown), + ADD_KEYMAP_NAME (MarkToFileBegin), + ADD_KEYMAP_NAME (MarkToFileEnd), + ADD_KEYMAP_NAME (MarkToPageBegin), + ADD_KEYMAP_NAME (MarkToPageEnd), + ADD_KEYMAP_NAME (MarkScrollUp), + ADD_KEYMAP_NAME (MarkScrollDown), + ADD_KEYMAP_NAME (MarkParagraphUp), + ADD_KEYMAP_NAME (MarkParagraphDown), + ADD_KEYMAP_NAME (MarkColumnPageUp), + ADD_KEYMAP_NAME (MarkColumnPageDown), + ADD_KEYMAP_NAME (MarkColumnLeft), + ADD_KEYMAP_NAME (MarkColumnRight), + ADD_KEYMAP_NAME (MarkColumnUp), + ADD_KEYMAP_NAME (MarkColumnDown), + ADD_KEYMAP_NAME (MarkColumnScrollUp), + ADD_KEYMAP_NAME (MarkColumnScrollDown), + ADD_KEYMAP_NAME (MarkColumnParagraphUp), + ADD_KEYMAP_NAME (MarkColumnParagraphDown), + ADD_KEYMAP_NAME (BlockShiftLeft), + ADD_KEYMAP_NAME (BlockShiftRight), + ADD_KEYMAP_NAME (InsertLiteral), + ADD_KEYMAP_NAME (ShowTabTws), + ADD_KEYMAP_NAME (SyntaxOnOff), + ADD_KEYMAP_NAME (SyntaxChoose), + ADD_KEYMAP_NAME (ShowMargin), + ADD_KEYMAP_NAME (OptionsSaveMode), + ADD_KEYMAP_NAME (About), /* An action to run external script from macro */ {"ExecuteScript", CK_PipeBlock (0)}, - {"WindowMove", CK_WindowMove}, - {"WindowResize", CK_WindowResize}, - {"WindowFullscreen", CK_WindowFullscreen}, - {"WindowList", CK_WindowList}, - {"WindowNext", CK_WindowNext}, - {"WindowPrev", CK_WindowPrev}, + ADD_KEYMAP_NAME (WindowMove), + ADD_KEYMAP_NAME (WindowResize), + ADD_KEYMAP_NAME (WindowFullscreen), + ADD_KEYMAP_NAME (WindowList), + ADD_KEYMAP_NAME (WindowNext), + ADD_KEYMAP_NAME (WindowPrev), #endif /* USE_INTERNAL_EDIT */ /* viewer */ - {"WrapMode", CK_WrapMode}, - {"HexEditMode", CK_HexEditMode}, - {"HexMode", CK_HexMode}, - {"MagicMode", CK_MagicMode}, - {"NroffMode", CK_NroffMode}, - {"BookmarkGoto", CK_BookmarkGoto}, - {"Ruler", CK_Ruler}, - {"SearchForward", CK_SearchForward}, - {"SearchBackward", CK_SearchBackward}, - {"SearchForwardContinue", CK_SearchForwardContinue}, - {"SearchBackwardContinue", CK_SearchBackwardContinue}, - {"SearchOppositeContinue", CK_SearchOppositeContinue}, + ADD_KEYMAP_NAME (WrapMode), + ADD_KEYMAP_NAME (HexEditMode), + ADD_KEYMAP_NAME (HexMode), + ADD_KEYMAP_NAME (MagicMode), + ADD_KEYMAP_NAME (NroffMode), + ADD_KEYMAP_NAME (BookmarkGoto), + ADD_KEYMAP_NAME (Ruler), + ADD_KEYMAP_NAME (SearchForward), + ADD_KEYMAP_NAME (SearchBackward), + ADD_KEYMAP_NAME (SearchForwardContinue), + ADD_KEYMAP_NAME (SearchBackwardContinue), + ADD_KEYMAP_NAME (SearchOppositeContinue), #ifdef USE_DIFF_VIEW /* diff viewer */ - {"ShowSymbols", CK_ShowSymbols}, - {"SplitFull", CK_SplitFull}, - {"Tab2", CK_Tab2}, - {"Tab3", CK_Tab3}, - {"Tab4", CK_Tab4}, - {"Tab8", CK_Tab8}, - {"HunkNext", CK_HunkNext}, - {"HunkPrev", CK_HunkPrev}, - {"EditOther", CK_EditOther}, - {"Merge", CK_Merge}, - {"MergeOther", CK_MergeOther}, + ADD_KEYMAP_NAME (ShowSymbols), + ADD_KEYMAP_NAME (SplitFull), + ADD_KEYMAP_NAME (Tab2), + ADD_KEYMAP_NAME (Tab3), + ADD_KEYMAP_NAME (Tab4), + ADD_KEYMAP_NAME (Tab8), + ADD_KEYMAP_NAME (HunkNext), + ADD_KEYMAP_NAME (HunkPrev), + ADD_KEYMAP_NAME (EditOther), + ADD_KEYMAP_NAME (Merge), + ADD_KEYMAP_NAME (MergeOther), #endif /* USE_DIFF_VIEW */ {NULL, CK_IgnoreKey} diff --git a/lib/keybind.h b/lib/keybind.h index 53ad1c39f..9638bd651 100644 --- a/lib/keybind.h +++ b/lib/keybind.h @@ -316,7 +316,7 @@ enum CK_InsertLiteral, CK_ExternalCommand, CK_Date, - CK_Mail, + CK_EditMail, /* viewer */ CK_WrapMode = 600L, diff --git a/src/editor/edit.c b/src/editor/edit.c index c77608084..e13be389a 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -3910,7 +3910,7 @@ edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) case CK_ExternalCommand: edit_ext_cmd (edit); break; - case CK_Mail: + case CK_EditMail: edit_mail_dialog (edit); break; #ifdef HAVE_CHARSET diff --git a/src/editor/editmenu.c b/src/editor/editmenu.c index ca42a74a4..489893849 100644 --- a/src/editor/editmenu.c +++ b/src/editor/editmenu.c @@ -190,7 +190,7 @@ create_command_menu (void) entries = g_list_prepend (entries, menu_separator_create ()); } #endif /* HAVE_ASPELL */ - entries = g_list_prepend (entries, menu_entry_create (_("&Mail..."), CK_Mail)); + entries = g_list_prepend (entries, menu_entry_create (_("&Mail..."), CK_EditMail)); return g_list_reverse (entries);