NeoMutt  2024-04-16-36-g75b6fb
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions.c
Go to the documentation of this file.
1
43#include "config.h"
44#ifdef _MAKEDOC
45#include "docs/makedoc_defs.h"
46#else
47#ifdef _MAKEDOC
48#include "docs/makedoc_defs.h"
49#else
50#include <stddef.h>
51#include "key/lib.h"
52#include "opcodes.h"
53#endif
54#endif
55
56// clang-format off
60const struct MenuFuncOp OpDialog[] = {
61 { "exit", OP_EXIT },
62 { NULL, 0 },
63};
64
68const struct MenuFuncOp OpGeneric[] = { /* map: generic */
69 /*
70 ** <para>
71 ** The <emphasis>generic</emphasis> menu is not a real menu, but specifies common functions
72 ** (such as movement) available in all menus except for <emphasis>pager</emphasis> and
73 ** <emphasis>editor</emphasis>. Changing settings for this menu will affect the default
74 ** bindings for all menus (except as noted).
75 ** </para>
76 */
77 { "bottom-page", OP_BOTTOM_PAGE },
78 { "check-stats", OP_CHECK_STATS },
79 { "current-bottom", OP_CURRENT_BOTTOM },
80 { "current-middle", OP_CURRENT_MIDDLE },
81 { "current-top", OP_CURRENT_TOP },
82 { "end-cond", OP_END_COND },
83 { "enter-command", OP_ENTER_COMMAND },
84 { "exit", OP_EXIT },
85 { "first-entry", OP_FIRST_ENTRY },
86 { "half-down", OP_HALF_DOWN },
87 { "half-up", OP_HALF_UP },
88 { "help", OP_HELP },
89 { "jump", OP_JUMP },
90 { "jump", OP_JUMP_1 },
91 { "jump", OP_JUMP_2 },
92 { "jump", OP_JUMP_3 },
93 { "jump", OP_JUMP_4 },
94 { "jump", OP_JUMP_5 },
95 { "jump", OP_JUMP_6 },
96 { "jump", OP_JUMP_7 },
97 { "jump", OP_JUMP_8 },
98 { "jump", OP_JUMP_9 },
99 { "last-entry", OP_LAST_ENTRY },
100 { "middle-page", OP_MIDDLE_PAGE },
101 { "next-entry", OP_NEXT_ENTRY },
102 { "next-line", OP_NEXT_LINE },
103 { "next-page", OP_NEXT_PAGE },
104 { "previous-entry", OP_PREV_ENTRY },
105 { "previous-line", OP_PREV_LINE },
106 { "previous-page", OP_PREV_PAGE },
107 { "redraw-screen", OP_REDRAW },
108 { "search", OP_SEARCH },
109 { "search-next", OP_SEARCH_NEXT },
110 { "search-opposite", OP_SEARCH_OPPOSITE },
111 { "search-reverse", OP_SEARCH_REVERSE },
112 { "select-entry", OP_GENERIC_SELECT_ENTRY },
113 { "shell-escape", OP_SHELL_ESCAPE },
114 { "show-log-messages", OP_SHOW_LOG_MESSAGES },
115 { "show-version", OP_VERSION },
116 { "tag-entry", OP_TAG },
117 { "tag-prefix", OP_TAG_PREFIX },
118 { "tag-prefix-cond", OP_TAG_PREFIX_COND },
119 { "top-page", OP_TOP_PAGE },
120 { "what-key", OP_WHAT_KEY },
121 // Deprecated
122 { "error-history", OP_SHOW_LOG_MESSAGES },
123 { "refresh", OP_REDRAW },
124 { NULL, 0 },
125};
126
131 { OP_QUIT, "q" },
132 { 0, NULL },
133};
134
138const struct MenuOpSeq GenericDefaultBindings[] = { /* map: generic */
139 { OP_BOTTOM_PAGE, "L" },
140 { OP_ENTER_COMMAND, ":" },
141 { OP_FIRST_ENTRY, "<home>" },
142 { OP_FIRST_ENTRY, "=" },
143 { OP_GENERIC_SELECT_ENTRY, "<keypadenter>" },
144 { OP_GENERIC_SELECT_ENTRY, "\n" }, // <Enter>
145 { OP_GENERIC_SELECT_ENTRY, "\r" }, // <Return>
146 { OP_HALF_DOWN, "]" },
147 { OP_HALF_UP, "[" },
148 { OP_HELP, "?" },
149 { OP_JUMP_1, "1" },
150 { OP_JUMP_2, "2" },
151 { OP_JUMP_3, "3" },
152 { OP_JUMP_4, "4" },
153 { OP_JUMP_5, "5" },
154 { OP_JUMP_6, "6" },
155 { OP_JUMP_7, "7" },
156 { OP_JUMP_8, "8" },
157 { OP_JUMP_9, "9" },
158 { OP_LAST_ENTRY, "*" },
159 { OP_LAST_ENTRY, "<end>" },
160 { OP_MIDDLE_PAGE, "M" },
161 { OP_NEXT_ENTRY, "<down>" },
162 { OP_NEXT_ENTRY, "j" },
163 { OP_NEXT_LINE, ">" },
164 { OP_NEXT_PAGE, "<pagedown>" },
165 { OP_NEXT_PAGE, "<right>" },
166 { OP_NEXT_PAGE, "z" },
167 { OP_PREV_ENTRY, "<up>" },
168 { OP_PREV_ENTRY, "k" },
169 { OP_PREV_LINE, "<" },
170 { OP_PREV_PAGE, "<left>" },
171 { OP_PREV_PAGE, "<pageup>" },
172 { OP_PREV_PAGE, "Z" },
173 { OP_REDRAW, "\014" }, // <Ctrl-L>
174 { OP_SEARCH, "/" },
175 { OP_SEARCH_NEXT, "n" },
176 { OP_SEARCH_REVERSE, "\033/" }, // <Alt-/>
177 { OP_SHELL_ESCAPE, "!" },
178 { OP_TAG, "t" },
179 { OP_TAG_PREFIX, ";" },
180 { OP_TOP_PAGE, "H" },
181 { OP_VERSION, "V" },
182 { 0, NULL },
183};
184// clang-format on
const struct MenuFuncOp OpGeneric[]
Functions for the Generic Menu.
Definition: functions.c:68
const struct MenuOpSeq GenericDefaultBindings[]
Key bindings for the Generic Menu.
Definition: functions.c:138
const struct MenuOpSeq DialogDefaultBindings[]
Key bindings for Simple Dialogs.
Definition: functions.c:130
const struct MenuFuncOp OpDialog[]
Functions for Simple Dialogs.
Definition: functions.c:60
Manage keymappings.
All user-callable functions.
Mapping between a function and an operation.
Definition: lib.h:101
Mapping between an operation and a key sequence.
Definition: lib.h:110