* New version 2.26
[alpine.git] / alpine / keymenu.c
blob54e8d34bc0b25c6cbff19ad6860c1a7de20bcca1
1 /*
2 * ========================================================================
3 * Copyright 2013-2022 Eduardo Chappa
4 * Copyright 2006-2008 University of Washington
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * ========================================================================
15 #include "headers.h"
16 #include "keymenu.h"
17 #include "mailcmd.h"
18 #include "signal.h"
19 #include "status.h"
20 #include "../pith/bitmap.h"
21 #include "../pith/conf.h"
22 #include "../pith/state.h"
26 * We put all of the keymenu definitions here so that it is easy to
27 * share them. The names are in keymenu.h, as well. Some of these
28 * aren't easily shareable because we modify them dynamically but
29 * here they are anyway. It's not altogether clear that this is a good idea.
30 * Perhaps it would be better to just define the keymenus multiple times
31 * in different source files even though they are the same, with static
32 * declarations.
34 * The key numbers are sometimes used symbolically, like OTHER_KEY. Those
35 * are in keymenu.h, too, and are hard to use. If you change a menu here
36 * be sure to check those key numbers that go with it in keymenu.h.
39 #ifdef _WINDOWS
40 void configure_menu_items (struct key_menu *, bitmap_t);
41 #endif
45 * Macro to simplify instantiation of key_menu structs from key structs
47 #define INST_KEY_MENU(X, Y) struct key_menu X = \
48 {sizeof(Y)/(sizeof(Y[0])*12), 0, 0, Y}
50 struct key cancel_keys[] =
51 {HELP_MENU,
52 {"^C",N_("Cancel"),{MC_NONE},KS_NONE},
53 NULL_MENU,
54 NULL_MENU,
55 NULL_MENU,
56 NULL_MENU,
57 NULL_MENU,
58 NULL_MENU,
59 NULL_MENU,
60 NULL_MENU,
61 NULL_MENU,
62 NULL_MENU};
63 INST_KEY_MENU(cancel_keymenu, cancel_keys);
67 * A bunch of these are NULL_MENU because we want to change them dynamically.
69 struct key ab_keys[] =
70 {HELP_MENU,
71 NULL_MENU,
72 NULL_MENU,
73 NULL_MENU,
74 /* TRANSLATORS: go to Previous Entry */
75 {"P", N_("PrevEntry"), {MC_PREVITEM,1,{'p'}}, KS_NONE},
76 /* TRANSLATORS: go to Next Entry */
77 {"N", N_("NextEntry"), {MC_NEXTITEM,1,{'n'}}, KS_NONE},
78 PREVPAGE_MENU,
79 NEXTPAGE_MENU,
80 NULL_MENU,
81 NULL_MENU,
82 NULL_MENU,
83 WHEREIS_MENU,
85 HELP_MENU,
86 OTHER_MENU,
87 QUIT_MENU,
88 NULL_MENU,
89 LISTFLD_MENU,
90 GOTO_MENU,
91 INDEX_MENU,
92 RCOMPOSE_MENU,
93 PRYNTTXT_MENU,
94 NULL_MENU,
95 SAVE_MENU,
96 FORWARD_MENU,
98 HELP_MENU,
99 OTHER_MENU,
100 /* TRANSLATORS: Select this Entry */
101 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_NONE},
102 /* TRANSLATORS: Apply a command to several objects at once */
103 {"A",N_("Apply"),{MC_APPLY,1,{'a'}},KS_APPLY},
104 /* TRANSLATORS: Select Current entry */
105 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
106 /* TRANSLATORS: Zoom refers to zooming in on a smaller set of
107 items, like with a camera zoom lense */
108 {"Z",N_("ZoomMode"),{MC_ZOOM,1,{'z'}},KS_NONE},
109 NULL_MENU,
110 NULL_MENU,
111 NULL_MENU,
112 NULL_MENU,
113 NULL_MENU,
114 NULL_MENU,
115 NULL_MENU};
116 INST_KEY_MENU(ab_keymenu, ab_keys);
119 struct key abook_select_keys[] =
120 {HELP_MENU,
121 NULL_MENU,
122 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
123 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
124 /* TRANSLATORS: go to Previous entry */
125 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
126 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
127 PREVPAGE_MENU,
128 NEXTPAGE_MENU,
129 HOMEKEY_MENU,
130 ENDKEY_MENU,
131 NULL_MENU,
132 WHEREIS_MENU};
133 INST_KEY_MENU(abook_select_km, abook_select_keys);
136 struct key abook_view_keys[] =
137 {HELP_MENU,
138 OTHER_MENU,
139 /* TRANSLATORS: Abook is an abbreviation for Address Book */
140 {"<",N_("Abook"),{MC_EXIT,2,{'<',','}},KS_NONE},
141 {"U",N_("Update"),{MC_EDIT,1,{'u'}},KS_NONE},
142 /* TRANSLATORS: ComposeTo means to start editing a new message to
143 this address book entry */
144 {"C",N_("ComposeTo"),{MC_COMPOSE,1,{'c'}},KS_COMPOSER},
145 RCOMPOSE_MENU,
146 PREVPAGE_MENU,
147 NEXTPAGE_MENU,
148 PRYNTTXT_MENU,
149 WHEREIS_MENU,
150 /* TRANSLATORS: abbreviation for Forward as Email */
151 {"F", N_("Fwd Email"), {MC_FORWARD, 1, {'f'}}, KS_FORWARD},
152 SAVE_MENU,
154 HELP_MENU,
155 OTHER_MENU,
156 /* TRANSLATORS: View the highlighted link, for example, a URL */
157 {"V",N_("ViewLink"),{MC_VIEW_HANDLE,3,{'v',ctrl('m'),ctrl('j')}},KS_NONE},
158 NULL_MENU,
159 /* TRANSLATORS: go to the previous link, for example, the previous URL */
160 {"^B",N_("PrevLink"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
161 {"^F",N_("NextLink"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
162 NULL_MENU,
163 NULL_MENU,
164 NULL_MENU,
165 NULL_MENU,
166 NULL_MENU,
167 NULL_MENU};
168 INST_KEY_MENU(abook_view_keymenu, abook_view_keys);
171 struct key abook_text_keys[] =
172 {HELP_MENU,
173 NULL_MENU,
174 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_NONE},
175 NULL_MENU,
176 NULL_MENU,
177 NULL_MENU,
178 PREVPAGE_MENU,
179 NEXTPAGE_MENU,
180 PRYNTTXT_MENU,
181 WHEREIS_MENU,
182 FWDEMAIL_MENU,
183 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
184 INST_KEY_MENU(abook_text_km, abook_text_keys);
187 struct key ldap_view_keys[] =
188 {HELP_MENU,
189 OTHER_MENU,
190 /* TRANSLATORS: go back to the index of results instead of
191 viewing this particular entry */
192 {"<",N_("Results Index"),{MC_EXIT,2,{'<',','}},KS_NONE},
193 NULL_MENU,
194 {"C", N_("ComposeTo"), {MC_COMPOSE,1,{'c'}}, KS_COMPOSER},
195 RCOMPOSE_MENU,
196 PREVPAGE_MENU,
197 NEXTPAGE_MENU,
198 PRYNTTXT_MENU,
199 WHEREIS_MENU,
200 FWDEMAIL_MENU,
201 SAVE_MENU,
203 HELP_MENU,
204 OTHER_MENU,
205 {"V",N_("ViewLink"),{MC_VIEW_HANDLE,3,{'v',ctrl('m'),ctrl('j')}},KS_NONE},
206 NULL_MENU,
207 {"^B",N_("PrevLink"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
208 {"^F",N_("NextLink"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
209 NULL_MENU,
210 NULL_MENU,
211 NULL_MENU,
212 NULL_MENU,
213 HOMEKEY_MENU,
214 ENDKEY_MENU};
215 INST_KEY_MENU(ldap_view_keymenu, ldap_view_keys);
218 struct key context_mgr_keys[] =
219 {HELP_MENU,
220 OTHER_MENU,
221 {"<", N_("Main Menu"), {MC_MAIN,3,{'m','<',','}}, KS_EXITMODE},
222 /* TRANSLATORS: View this Collection of folders */
223 {">", "[" N_("View Cltn") "]",
224 {MC_CHOICE,5,{'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
225 PREVC_MENU,
226 NEXTC_MENU,
227 PREVPAGE_MENU,
228 NEXTPAGE_MENU,
229 NULL_MENU,
230 NULL_MENU,
231 NULL_MENU,
232 WHEREIS_MENU,
234 HELP_MENU,
235 OTHER_MENU,
236 QUIT_MENU,
237 NULL_MENU,
238 NULL_MENU,
239 GOTO_MENU,
240 CIND_MENU,
241 COMPOSE_MENU,
242 PRYNTTXT_MENU,
243 RCOMPOSE_MENU,
244 HOMEKEY_MENU,
245 ENDKEY_MENU};
246 INST_KEY_MENU(c_mgr_km, context_mgr_keys);
249 struct key context_cfg_keys[] =
250 {HELP_MENU,
251 OTHER_MENU,
252 {"E", N_("Exit Setup"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
253 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
254 PREVC_MENU,
255 NEXTC_MENU,
256 PREVPAGE_MENU,
257 NEXTPAGE_MENU,
258 /* TRANSLATORS; Add a Collection of folders */
259 {"A", N_("Add Cltn"), {MC_ADD,1,{'a'}}, KS_NONE},
260 DELC_MENU,
261 /* TRANSLATORS; Change the order of items in a list */
262 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}},KS_NONE},
263 WHEREIS_MENU,
265 HELP_MENU,
266 OTHER_MENU,
267 NULL_MENU,
268 NULL_MENU,
269 NULL_MENU,
270 NULL_MENU,
271 NULL_MENU,
272 NULL_MENU,
273 PRYNTTXT_MENU,
274 NULL_MENU,
275 HOMEKEY_MENU,
276 ENDKEY_MENU};
277 INST_KEY_MENU(c_cfg_km, context_cfg_keys);
280 struct key context_select_keys[] =
281 {HELP_MENU,
282 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
283 NULL_MENU,
284 /* TRANSLATORS: View this collection */
285 {">", "[" N_("View Cltn") "]",
286 {MC_CHOICE, 5, {'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
287 PREVC_MENU,
288 NEXTC_MENU,
289 PREVPAGE_MENU,
290 NEXTPAGE_MENU,
291 HOMEKEY_MENU,
292 ENDKEY_MENU,
293 NULL_MENU,
294 WHEREIS_MENU};
295 INST_KEY_MENU(c_sel_km, context_select_keys);
298 struct key context_fcc_keys[] =
299 {HELP_MENU,
300 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
301 NULL_MENU,
302 {">", "[" N_("View Cltn") "]",
303 {MC_CHOICE, 5, {'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
304 PREVC_MENU,
305 NEXTC_MENU,
306 PREVPAGE_MENU,
307 NEXTPAGE_MENU,
308 HOMEKEY_MENU,
309 ENDKEY_MENU,
310 NULL_MENU,
311 WHEREIS_MENU};
312 INST_KEY_MENU(c_fcc_km, context_fcc_keys);
314 struct key folder_keys[] =
315 {HELP_MENU,
316 OTHER_MENU,
317 {"<", NULL, {MC_EXIT,2,{'<',','}}, KS_NONE},
318 {">", NULL, {MC_CHOICE,2,{'>','.'}}, KS_NONE},
319 PREVF_MENU,
320 NEXTF_MENU,
321 PREVPAGE_MENU,
322 NEXTPAGE_MENU,
323 /* TRANSLATORS: make an addition, for example add a new folder
324 or a new entry in an address book */
325 {"A",N_("Add"),{MC_ADDFLDR,1,{'a'}},KS_NONE},
326 DELETE_MENU,
327 /* TRANSLATORS: change the name of something */
328 {"R",N_("Rename"),{MC_RENAMEFLDR,1,{'r'}}, KS_NONE},
329 WHEREIS_MENU,
331 HELP_MENU,
332 OTHER_MENU,
333 QUIT_MENU,
334 MAIN_MENU,
335 {"V", "[" N_("View Fldr") "]", {MC_OPENFLDR}, KS_NONE},
336 GOTO_MENU,
337 CIND_MENU,
338 COMPOSE_MENU,
339 {"%", N_("Print"), {MC_PRINTFLDR,1,{'%'}}, KS_PRINT},
340 {"Z", N_("ZoomMode"), {MC_ZOOM,1,{'z'}}, KS_NONE},
341 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_SELECT},
342 /* TRANSLATORS: Select current item */
343 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECT},
345 HELP_MENU,
346 OTHER_MENU,
347 NULL_MENU,
348 NULL_MENU,
349 NULL_MENU,
350 NULL_MENU,
351 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}},KS_NONE},
352 RCOMPOSE_MENU,
353 EXPORT_MENU,
354 /* TRANSLATORS: Import refers to bringing something in from
355 outside of alpine's normal world */
356 {"U", N_("Import"), {MC_IMPORT,1,{'u'}},KS_NONE},
357 HOMEKEY_MENU,
358 ENDKEY_MENU};
359 INST_KEY_MENU(folder_km, folder_keys);
362 struct key folder_sel_keys[] =
363 {HELP_MENU,
364 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
365 NULL_MENU,
366 {NULL, NULL, {MC_CHOICE,0}, KS_NONE},
367 PREVF_MENU,
368 NEXTF_MENU,
369 PREVPAGE_MENU,
370 NEXTPAGE_MENU,
371 {"S", N_("Select"), {MC_OPENFLDR,1,{'s'}}, KS_NONE},
372 NULL_MENU,
373 NULL_MENU,
374 WHEREIS_MENU,
376 HELP_MENU,
377 OTHER_MENU,
378 NULL_MENU,
379 NULL_MENU,
380 NULL_MENU,
381 NULL_MENU,
382 NULL_MENU,
383 NULL_MENU,
384 NULL_MENU,
385 NULL_MENU,
386 HOMEKEY_MENU,
387 ENDKEY_MENU};
388 INST_KEY_MENU(folder_sel_km, folder_sel_keys);
391 struct key folder_sela_keys[] =
392 {HELP_MENU,
393 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
394 NULL_MENU,
395 {NULL, NULL, {MC_CHOICE,0}, KS_NONE},
396 PREVF_MENU,
397 NEXTF_MENU,
398 PREVPAGE_MENU,
399 NEXTPAGE_MENU,
400 {"S", N_("Select"), {MC_OPENFLDR,1,{'s'}}, KS_NONE},
401 NULL_MENU,
402 {"A", N_("AddNew"), {MC_ADD,1,{'a'}}, KS_NONE},
403 WHEREIS_MENU,
405 HELP_MENU,
406 OTHER_MENU,
407 NULL_MENU,
408 NULL_MENU,
409 NULL_MENU,
410 NULL_MENU,
411 NULL_MENU,
412 NULL_MENU,
413 NULL_MENU,
414 NULL_MENU,
415 HOMEKEY_MENU,
416 ENDKEY_MENU};
417 INST_KEY_MENU(folder_sela_km, folder_sela_keys);
420 struct key folder_sub_keys[] =
421 {HELP_MENU,
422 /* TRANSLATORS: Subscribe to a news group */
423 {"S", N_("Subscribe"), {MC_CHOICE,1,{'s'}}, KS_NONE},
424 /* TRANSLATORS: Exit Subscribe screen */
425 {"E", N_("ExitSubscb"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
426 {NULL, "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
427 PREVF_MENU,
428 NEXTF_MENU,
429 PREVPAGE_MENU,
430 NEXTPAGE_MENU,
431 /* TRANSLATORS: List Mode in alpine is where you can select not just
432 one of something but you can select a whole list of something, for
433 example a whole list of addresses to send to. */
434 {"L", N_("List Mode"), {MC_LISTMODE, 1, {'l'}}, KS_NONE},
435 NULL_MENU,
436 NULL_MENU,
437 WHEREIS_MENU,
439 HELP_MENU,
440 OTHER_MENU,
441 NULL_MENU,
442 NULL_MENU,
443 NULL_MENU,
444 NULL_MENU,
445 NULL_MENU,
446 NULL_MENU,
447 NULL_MENU,
448 NULL_MENU,
449 HOMEKEY_MENU,
450 ENDKEY_MENU};
451 INST_KEY_MENU(folder_sub_km, folder_sub_keys);
454 struct key folder_post_keys[] =
455 {HELP_MENU,
456 NULL_MENU,
457 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
458 {"S", "[" N_("Select") "]", {MC_CHOICE, 3, {'s',ctrl('M'),ctrl('J')}}, KS_NONE},
459 PREVF_MENU,
460 NEXTF_MENU,
461 PREVPAGE_MENU,
462 NEXTPAGE_MENU,
463 HOMEKEY_MENU,
464 ENDKEY_MENU,
465 NULL_MENU,
466 WHEREIS_MENU};
467 INST_KEY_MENU(folder_post_km, folder_post_keys);
470 struct key help_keys[] =
471 {MAIN_MENU,
472 {NULL,NULL,{MC_EXIT,1,{'e'}}, KS_EXITMODE},
473 {NULL,NULL,{MC_EXIT,1,{'e'}}, KS_EXITMODE},
474 {NULL,NULL,{MC_VIEW_HANDLE,3,{'v',ctrl('m'),ctrl('j')}},KS_NONE},
475 {"^B",N_("PrevLink"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
476 {"^F",N_("NextLink"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
477 PREVPAGE_MENU,
478 NEXTPAGE_MENU,
479 PRYNTMSG_MENU,
480 {"Z",N_("Print All"),{MC_PRINTALL,1,{'z'}},KS_NONE},
481 {"N",N_("Name"),{MC_EXPORT,1,{'n'}},KS_NONE},
482 WHEREIS_MENU,
484 HELP_MENU,
485 OTHER_MENU,
486 NULL_MENU,
487 NULL_MENU,
488 NULL_MENU,
489 NULL_MENU,
490 NULL_MENU,
491 NULL_MENU,
492 NULL_MENU,
493 NULL_MENU,
494 HOMEKEY_MENU,
495 ENDKEY_MENU};
496 INST_KEY_MENU(help_keymenu, help_keys);
499 struct key rev_msg_keys[] =
500 {HELP_MENU,
501 OTHER_MENU,
502 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
503 NULL_MENU,
504 {"T",NULL,{MC_TOGGLE,1,{'t'}},KS_NONE},
505 {"D",NULL,{MC_JUMP,1,{'d'}},KS_NONE},
506 PREVPAGE_MENU,
507 NEXTPAGE_MENU,
508 PRYNTTXT_MENU,
509 WHEREIS_MENU,
510 FWDEMAIL_MENU,
511 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
513 HELP_MENU,
514 OTHER_MENU,
515 NULL_MENU,
516 NULL_MENU,
517 NULL_MENU,
518 NULL_MENU,
519 NULL_MENU,
520 NULL_MENU,
521 NULL_MENU,
522 NULL_MENU,
523 HOMEKEY_MENU,
524 ENDKEY_MENU};
525 INST_KEY_MENU(rev_msg_keymenu, rev_msg_keys);
528 struct key ans_certfail_keys[] =
529 {NULL_MENU,
530 NULL_MENU,
531 NULL_MENU,
532 /* TRANSLATORS: Continue means to keep going. The user is paused to read
533 something and has to tell us to continue when they are finished. */
534 {"C","[" N_("Continue") "]",{MC_YES,3,{'c',ctrl('J'),ctrl('M')}},KS_NONE},
535 NULL_MENU,
536 NULL_MENU,
537 PREVPAGE_MENU,
538 NEXTPAGE_MENU,
539 NULL_MENU,
540 NULL_MENU,
541 NULL_MENU,
542 NULL_MENU};
543 INST_KEY_MENU(ans_certfail_keymenu, ans_certfail_keys);
546 struct key ans_certquery_keys[] =
547 {HELP_MENU,
548 NULL_MENU,
549 {"Y",N_("Yes, continue"),{MC_YES,1,{'y'}},KS_NONE},
550 {"D","[" N_("Details") "]",{MC_VIEW_HANDLE,3,{'d',ctrl('M'),ctrl('J')}},KS_NONE},
551 {"N",N_("No"),{MC_NO,1,{'n'}},KS_NONE},
552 NULL_MENU,
553 PREVPAGE_MENU,
554 NEXTPAGE_MENU,
555 PRYNTTXT_MENU,
556 WHEREIS_MENU,
557 FWDEMAIL_MENU,
558 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
559 INST_KEY_MENU(ans_certquery_keymenu, ans_certquery_keys);
561 struct key oauth2_alpine_auth_keys[] =
562 {HELP_MENU,
563 NULL_MENU,
564 {"C",N_("Enter Code"),{MC_YES,1,{'c'}},KS_NONE},
565 {"V","[" N_("View URL") "]",{MC_VIEW_HANDLE,3,{'v',ctrl('M'),ctrl('J')}},KS_NONE},
566 {"E",N_("Exit"),{MC_NO,1,{'e'}},KS_NONE},
567 NULL_MENU,
568 PREVPAGE_MENU,
569 NEXTPAGE_MENU,
570 PRYNTTXT_MENU,
571 WHEREIS_MENU,
572 FWDEMAIL_MENU,
573 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
574 INST_KEY_MENU(oauth2_auth_keymenu, oauth2_alpine_auth_keys);
576 struct key oauth2_device_alpine_auth_keys[] =
577 {HELP_MENU,
578 NULL_MENU,
579 {"V","[" N_("View URL") "]",{MC_VIEW_HANDLE,3,{'v',ctrl('M'),ctrl('J')}},KS_NONE},
580 {"E",N_("Exit"),{MC_NO,1,{'e'}},KS_NONE},
581 PREVPAGE_MENU,
582 NEXTPAGE_MENU,
583 PRYNTTXT_MENU,
584 WHEREIS_MENU,
585 FWDEMAIL_MENU,
586 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
587 NULL_MENU,
588 NULL_MENU};
589 INST_KEY_MENU(oauth2_device_auth_keymenu, oauth2_device_alpine_auth_keys);
591 struct key forge_keys[] =
592 {HELP_MENU,
593 NULL_MENU,
594 {"Y",N_("Yes, continue"),{MC_YES,1,{'y'}},KS_NONE},
595 {"N",N_("No"),{MC_NO,1,{'n'}},KS_NONE},
596 NULL_MENU,
597 NULL_MENU,
598 PREVPAGE_MENU,
599 NEXTPAGE_MENU,
600 PRYNTTXT_MENU,
601 WHEREIS_MENU,
602 FWDEMAIL_MENU,
603 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
604 INST_KEY_MENU(forge_keymenu, forge_keys);
607 struct key listmgr_keys[] =
608 {HELP_MENU,
609 NULL_MENU,
610 /* TRANSLATORS: Exit Command List */
611 {"E",N_("Exit CmdList"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
612 {"Ret","[" N_("Try Command") "]",{MC_VIEW_HANDLE,3,
613 {ctrl('m'),ctrl('j'),KEY_RIGHT}},KS_NONE},
614 /* TRANSLATORS: go to Previous Command in list */
615 {"^B",N_("Prev Cmd"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
616 /* TRANSLATORS: go to Next Command in list */
617 {"^F",N_("Next Cmd"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
618 PREVPAGE_MENU,
619 NEXTPAGE_MENU,
620 PRYNTTXT_MENU,
621 WHEREIS_MENU,
622 HOMEKEY_MENU,
623 ENDKEY_MENU};
624 INST_KEY_MENU(listmgr_keymenu, listmgr_keys);
627 struct key index_keys[] =
628 {HELP_MENU,
629 OTHER_MENU,
630 {"<", NULL, {MC_FOLDERS,2,{'<',','}}, KS_NONE},
631 VIEWMSG_MENU,
632 PREVMSG_MENU,
633 NEXTMSG_MENU,
634 PREVPAGE_MENU,
635 NEXTPAGE_MENU,
636 DELETE_MENU,
637 UNDELETE_MENU,
638 REPLY_MENU,
639 FORWARD_MENU,
641 HELP_MENU,
642 OTHER_MENU,
643 MAIN_MENU,
644 QUIT_MENU,
645 COMPOSE_MENU,
646 GOTO_MENU,
647 TAB_MENU,
648 WHEREIS_MENU,
649 PRYNTMSG_MENU,
650 TAKE_MENU,
651 SAVE_MENU,
652 EXPORT_MENU,
654 HELP_MENU,
655 OTHER_MENU,
656 {"X",NULL,{MC_EXPUNGE,1,{'x'}},KS_NONE},
657 /* TRANSLATORS: this stands for unexclude which is the opposite
658 of the exclude command. Exclude eliminates some messages from
659 the view and unexclude gets them back. */
660 {"&",N_("unXclude"),{MC_UNEXCLUDE,1,{'&'}},KS_NONE},
661 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_SELECT},
662 {"A",N_("Apply"),{MC_APPLY,1,{'a'}},KS_APPLY},
663 FLDRSORT_MENU,
664 JUMP_MENU,
665 HDRMODE_MENU,
666 BOUNCE_MENU,
667 FLAG_MENU,
668 PIPE_MENU,
670 HELP_MENU,
671 OTHER_MENU,
672 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
673 {"Z",N_("ZoomMode"),{MC_ZOOM,1,{'z'}},KS_ZOOM},
674 LISTFLD_MENU,
675 RCOMPOSE_MENU,
676 HOMEKEY_MENU,
677 ENDKEY_MENU,
678 NULL_MENU,
679 /* TRANSLATORS: toggles a collapsed view or an expanded view
680 of a message thread on and off */
681 {"/",N_("Collapse/Expand"),{MC_COLLAPSE,1,{'/'}},KS_NONE},
682 {"@", N_("Quota"), {MC_QUOTA,1,{'@'}}, KS_NONE},
683 NULL_MENU};
684 INST_KEY_MENU(index_keymenu, index_keys);
687 struct key simple_index_keys[] =
688 {HELP_MENU,
689 {"E",N_("ExitSelect"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
690 NULL_MENU,
691 {"S","[" N_("Select") "]",{MC_SELECT,3,{'s',ctrl('M'),ctrl('J')}},KS_SELECT},
692 PREVMSG_MENU,
693 NEXTMSG_MENU,
694 PREVPAGE_MENU,
695 NEXTPAGE_MENU,
696 DELETE_MENU,
697 UNDELETE_MENU,
698 WHEREIS_MENU,
699 NULL_MENU};
700 INST_KEY_MENU(simple_index_keymenu, simple_index_keys);
703 struct key thread_keys[] =
704 {HELP_MENU,
705 OTHER_MENU,
706 /* TRANSLATORS: go to the Folder List */
707 {"<", N_("FldrList"), {MC_FOLDERS,2,{'<',','}}, KS_NONE},
708 /* TRANSLATORS: View a Thread of messages */
709 {">", "[" N_("ViewThd") "]", {MC_VIEW_ENTRY,5,{'v','.','>',ctrl('M'),ctrl('J')}},
710 KS_VIEW},
711 /* TRANSLATORS: go to the Previous Thread */
712 {"P", N_("PrevThd"), {MC_PREVITEM, 1, {'p'}}, KS_PREVMSG},
713 /* TRANSLATORS: go to the Next Thread */
714 {"N", N_("NextThd"), {MC_NEXTITEM, 1, {'n'}}, KS_NEXTMSG},
715 PREVPAGE_MENU,
716 NEXTPAGE_MENU,
717 DELETE_MENU,
718 UNDELETE_MENU,
719 REPLY_MENU,
720 FORWARD_MENU,
722 HELP_MENU,
723 OTHER_MENU,
724 MAIN_MENU,
725 QUIT_MENU,
726 COMPOSE_MENU,
727 GOTO_MENU,
728 TAB_MENU,
729 WHEREIS_MENU,
730 PRYNTMSG_MENU,
731 TAKE_MENU,
732 SAVE_MENU,
733 EXPORT_MENU,
735 HELP_MENU,
736 OTHER_MENU,
737 {"X",NULL,{MC_EXPUNGE,1,{'x'}},KS_NONE},
738 {"&",N_("unXclude"),{MC_UNEXCLUDE,1,{'&'}},KS_NONE},
739 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_SELECT},
740 {"A",N_("Apply"),{MC_APPLY,1,{'a'}},KS_APPLY},
741 FLDRSORT_MENU,
742 JUMP_MENU,
743 HDRMODE_MENU,
744 BOUNCE_MENU,
745 FLAG_MENU,
746 PIPE_MENU,
748 HELP_MENU,
749 OTHER_MENU,
750 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
751 {"Z",N_("ZoomMode"),{MC_ZOOM,1,{'z'}},KS_ZOOM},
752 LISTFLD_MENU,
753 RCOMPOSE_MENU,
754 HOMEKEY_MENU,
755 ENDKEY_MENU,
756 NULL_MENU,
757 {"/",N_("Collapse/Expand"),{MC_COLLAPSE,1,{'/'}},KS_NONE},
758 {"@", N_("Quota"), {MC_QUOTA,1,{'@'}}, KS_NONE},
759 NULL_MENU};
760 INST_KEY_MENU(thread_keymenu, thread_keys);
763 struct key att_index_keys[] =
764 {HELP_MENU,
765 OTHER_MENU,
766 {"<",NULL,{MC_EXIT,2,{'<',','}},KS_EXITMODE},
767 {">","[" N_("View") "]",{MC_VIEW_ATCH,5,{'v','>','.',ctrl('M'),ctrl('J')}},
768 KS_VIEW},
769 /* TRANSLATORS: go to Previous Attachment */
770 {"P", N_("PrevAttch"),{MC_PREVITEM,4,{'p',ctrl('B'),ctrl('P'),KEY_UP}},
771 KS_PREVMSG},
772 /* TRANSLATORS: go to Next Attachment */
773 {"N", N_("NextAtch"),
774 {MC_NEXTITEM, 5, {'n','\t',ctrl('F'),ctrl('N'), KEY_DOWN}},
775 KS_NEXTMSG},
776 PREVPAGE_MENU,
777 NEXTPAGE_MENU,
778 DELETE_MENU,
779 UNDELETE_MENU,
780 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
781 {NULL, NULL, {MC_EXPORT, 1, {'e'}}, KS_EXPORT},
783 HELP_MENU,
784 OTHER_MENU,
785 MAIN_MENU,
786 QUIT_MENU,
787 PIPE_MENU,
788 BOUNCE_MENU,
789 /* TRANSLATORS: About Attachment, a short description of the attachment */
790 {"A",N_("AboutAttch"),{MC_ABOUTATCH,1,{'a'}},KS_NONE},
791 WHEREIS_MENU,
792 {"%", N_("Print"), {MC_PRINTMSG,1,{'%'}}, KS_PRINT},
793 INDEX_MENU,
794 REPLY_MENU,
795 FORWARD_MENU,
797 HELP_MENU,
798 OTHER_MENU,
799 HDRMODE_MENU,
800 {"X",N_("eXternal"),{MC_EXTERNAL,1,{'x'}},KS_NONE},
801 NULL_MENU,
802 NULL_MENU,
803 NULL_MENU,
804 NULL_MENU,
805 NULL_MENU,
806 NULL_MENU,
807 NULL_MENU,
808 NULL_MENU};
809 INST_KEY_MENU(att_index_keymenu, att_index_keys);
812 struct key att_view_keys[] =
813 {HELP_MENU,
814 OTHER_MENU,
815 {"<",NULL,{MC_EXIT,2,{'<',','}},KS_EXITMODE},
816 /* TRANSLATORS: View highlighted URL */
817 {"Ret","[" N_("View Hilite") "]",{MC_VIEW_HANDLE,3,
818 {ctrl('m'),ctrl('j'),KEY_RIGHT}},KS_NONE},
819 /* TRANSLATORS: go to Previous URL */
820 {"^B",N_("Prev URL"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
821 /* TRANSLATORS: go to Next URL */
822 {"^F",N_("Next URL"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
823 PREVPAGE_MENU,
824 NEXTPAGE_MENU,
825 DELETE_MENU,
826 UNDELETE_MENU,
827 SAVE_MENU,
828 EXPORT_MENU,
830 HELP_MENU,
831 OTHER_MENU,
832 MAIN_MENU,
833 QUIT_MENU,
834 PIPE_MENU,
835 BOUNCE_MENU,
836 HDRMODE_MENU,
837 WHEREIS_MENU,
838 {"%", N_("Print"), {MC_PRINTMSG,1,{'%'}}, KS_PRINT},
839 NULL_MENU,
840 REPLY_MENU,
841 FORWARD_MENU,
843 HELP_MENU,
844 OTHER_MENU,
845 HOMEKEY_MENU,
846 ENDKEY_MENU,
847 NULL_MENU,
848 NULL_MENU,
849 #ifdef SMIME
850 {"^D","Decrypt", {MC_DECRYPT,1,{ctrl('d')}},KS_NONE},
851 {"^E","Security", {MC_SECURITY,1,{ctrl('e')}},KS_NONE},
852 #else
853 NULL_MENU,
854 NULL_MENU,
855 #endif
856 NULL_MENU,
857 NULL_MENU,
858 NULL_MENU,
859 NULL_MENU};
860 INST_KEY_MENU(att_view_keymenu, att_view_keys);
863 struct key view_keys[] =
864 {HELP_MENU,
865 OTHER_MENU,
866 /* TRANSLATORS: go to Message Index */
867 {"<",N_("MsgIndex"),{MC_INDEX,3,{'i','<',','}},KS_FLDRINDEX},
868 /* TRANSLATORS: View the Attachment */
869 {">",N_("ViewAttch"),{MC_VIEW_ATCH,3,{'v','>','.'}},KS_NONE},
870 PREVMSG_MENU,
871 NEXTMSG_MENU,
872 PREVPAGE_MENU,
873 NEXTPAGE_MENU,
874 DELETE_MENU,
875 UNDELETE_MENU,
876 REPLY_MENU,
877 FORWARD_MENU,
879 HELP_MENU,
880 OTHER_MENU,
881 MAIN_MENU,
882 QUIT_MENU,
883 LISTFLD_MENU,
884 GOTO_MENU,
885 COMPOSE_MENU,
886 WHEREIS_MENU,
887 PRYNTMSG_MENU,
888 TAKE_MENU,
889 SAVE_MENU,
890 EXPORT_MENU,
892 HELP_MENU,
893 OTHER_MENU,
894 /* TRANSLATORS: View the highlighted URL */
895 {"Ret","[" N_("View Hilite") "]",{MC_VIEW_HANDLE,3,
896 {ctrl('m'),ctrl('j'),KEY_RIGHT}},KS_NONE},
897 /* TRANSLATORS: Select the current item */
898 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
899 /* TRANSLATORS: go to previous URL */
900 {"^B",N_("Prev URL"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
901 /* TRANSLATORS: go to next URL */
902 {"^F",N_("Next URL"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
903 JUMP_MENU,
904 TAB_MENU,
905 HDRMODE_MENU,
906 BOUNCE_MENU,
907 FLAG_MENU,
908 PIPE_MENU,
910 HELP_MENU,
911 OTHER_MENU,
912 HOMEKEY_MENU,
913 ENDKEY_MENU,
914 RCOMPOSE_MENU,
915 {"A",N_("TogglePreferPlain"),{MC_TOGGLE,1,{'a'}},KS_NONE},
916 #ifdef SMIME
917 {"^D","Decrypt", {MC_DECRYPT,1,{ctrl('d')}},KS_NONE},
918 {"^E","Security", {MC_SECURITY,1,{ctrl('e')}},KS_NONE},
919 #else
920 NULL_MENU,
921 NULL_MENU,
922 #endif
923 NULL_MENU,
924 NULL_MENU,
925 NULL_MENU,
926 NULL_MENU};
927 INST_KEY_MENU(view_keymenu, view_keys);
930 struct key simple_text_keys[] =
931 {HELP_MENU,
932 OTHER_MENU,
933 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
934 NULL_MENU,
935 NULL_MENU,
936 NULL_MENU,
937 PREVPAGE_MENU,
938 NEXTPAGE_MENU,
939 PRYNTTXT_MENU,
940 WHEREIS_MENU,
941 FWDEMAIL_MENU,
942 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
944 HELP_MENU,
945 OTHER_MENU,
946 NULL_MENU,
947 NULL_MENU,
948 NULL_MENU,
949 NULL_MENU,
950 NULL_MENU,
951 NULL_MENU,
952 NULL_MENU,
953 NULL_MENU,
954 HOMEKEY_MENU,
955 ENDKEY_MENU};
956 INST_KEY_MENU(simple_text_keymenu, simple_text_keys);
959 struct key oe_keys[] =
960 {{"^G",N_("Help"),{MC_NONE},KS_SCREENHELP},
961 {"^C",N_("Cancel"),{MC_NONE},KS_NONE},
962 {"^T","xxx",{MC_NONE},KS_NONE},
963 /* TRANSLATORS: The user is entering characters, for example, the
964 name of a folder. Accept means the user is done and wants to
965 accept what is currently displayed. */
966 {"Ret",N_("Accept"),{MC_NONE},KS_NONE},
967 NULL_MENU,
968 NULL_MENU,
969 NULL_MENU,
970 NULL_MENU,
971 NULL_MENU,
972 NULL_MENU,
973 NULL_MENU,
974 NULL_MENU};
975 INST_KEY_MENU(oe_keymenu, oe_keys);
978 struct key choose_setup_keys[] =
979 {HELP_MENU,
980 OTHER_MENU,
981 {"E",N_("Exit Setup"),{MC_EXIT,2,{'e',ctrl('C')}},KS_EXITMODE},
982 {"P",N_("Printer"),{MC_PRINTER,1,{'p'}},KS_NONE},
983 /* TRANSLATORS: Change password */
984 {"N",N_("Newpassword"),{MC_PASSWD,1,{'n'}},KS_NONE},
985 /* TRANSLATORS: Configure Alpine */
986 {"C",N_("Config"),{MC_CONFIG,1,{'c'}},KS_NONE},
987 /* TRANSLATORS: Edit signature block */
988 {"S",N_("Signature"),{MC_SIG,1,{'s'}},KS_NONE},
989 /* TRANSLATORS: configure address books */
990 {"A",N_("AddressBooks"),{MC_ABOOKS,1,{'a'}},KS_NONE},
991 /* TRANSLATORS: configure collection lists */
992 {"L",N_("collectionList"),{MC_CLISTS,1,{'l'}},KS_NONE},
993 /* TRANSLATORS: configure rules, an alpine concept */
994 {"R",N_("Rules"),{MC_RULES,1,{'r'}},KS_NONE},
995 /* TRANSLATORS: configure directory servers */
996 {"D",N_("Directory"),{MC_DIRECTORY,1,{'d'}},KS_NONE},
997 /* TRANSLATORS: configure color */
998 {"K",N_("Kolor"),{MC_KOLOR,1,{'k'}},KS_NONE},
1000 HELP_MENU,
1001 OTHER_MENU,
1002 NULL_MENU,
1003 /* TRANSLATORS: remote configuration setup */
1004 {"Z",N_("RemoteConfigSetup"),{MC_REMOTE,1,{'z'}},KS_NONE},
1005 /* TRANSLATORS: configure S/MIME */
1006 {"M",N_("S/Mime"),{MC_SECURITY,1,{'m'}},KS_NONE},
1007 {"U",N_("xoaUth2"),{MC_XOAUTH2,1,{'u'}},KS_NONE},
1008 PREVPAGE_MENU,
1009 NEXTPAGE_MENU,
1010 NULL_MENU,
1011 NULL_MENU,
1012 HOMEKEY_MENU,
1013 ENDKEY_MENU};
1014 INST_KEY_MENU(choose_setup_keymenu, choose_setup_keys);
1017 struct key main_keys[] =
1018 {HELP_MENU,
1019 OTHER_MENU,
1020 NULL_MENU,
1021 NULL_MENU,
1022 /* TRANSLATORS: go to Previous Command in list */
1023 {"P",N_("PrevCmd"),{MC_PREVITEM,3,{'p',ctrl('P'),KEY_UP}},KS_NONE},
1024 {"N",N_("NextCmd"),{MC_NEXTITEM,3,{'n',ctrl('N'),KEY_DOWN}},KS_NONE},
1025 NULL_MENU,
1026 NULL_MENU,
1027 /* TRANSLATORS: show release notes */
1028 {"R",N_("RelNotes"),{MC_RELNOTES,1,{'r'}},KS_NONE},
1029 /* TRANSLATORS: lock keyboard */
1030 {"K",N_("KBLock"),{MC_KBLOCK,1,{'k'}},KS_NONE},
1031 NULL_MENU,
1032 NULL_MENU,
1034 HELP_MENU,
1035 OTHER_MENU,
1036 QUIT_MENU,
1037 COMPOSE_MENU,
1038 LISTFLD_MENU,
1039 GOTO_MENU,
1040 {"I",N_("Index"),{MC_INDEX,1,{'i'}},KS_FLDRINDEX},
1041 /* TRANSLATORS: go to the Journal. The Journal shows past
1042 messages that alpine has shown the user. */
1043 {"J",N_("Journal"),{MC_JOURNAL,1,{'j'}},KS_REVIEW},
1044 /* TRANSLATORS: go to the Setup screen */
1045 {"S",N_("Setup"),{MC_SETUP,1,{'s'}},KS_NONE},
1046 /* TRANSLATORS: go to the address book screen */
1047 {"A",N_("AddrBook"),{MC_ADDRBOOK,1,{'a'}},KS_ADDRBOOK},
1048 RCOMPOSE_MENU,
1049 NULL_MENU};
1050 INST_KEY_MENU(main_keymenu, main_keys);
1053 struct key simple_file_keys[] =
1054 {HELP_MENU,
1055 OTHER_MENU,
1056 {"Q",N_("Quit Viewer"),{MC_EXIT,1,{'q'}},KS_NONE},
1057 NULL_MENU,
1058 NULL_MENU,
1059 NULL_MENU,
1060 PREVPAGE_MENU,
1061 NEXTPAGE_MENU,
1062 PRYNTTXT_MENU,
1063 WHEREIS_MENU,
1064 FWDEMAIL_MENU,
1065 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
1067 HELP_MENU,
1068 OTHER_MENU,
1069 NULL_MENU,
1070 NULL_MENU,
1071 NULL_MENU,
1072 NULL_MENU,
1073 NULL_MENU,
1074 NULL_MENU,
1075 NULL_MENU,
1076 NULL_MENU,
1077 HOMEKEY_MENU,
1078 ENDKEY_MENU};
1079 INST_KEY_MENU(simple_file_keymenu, simple_file_keys);
1082 struct key nuov_keys[] =
1083 {HELP_MENU,
1084 OTHER_MENU,
1085 {"E",NULL,{MC_EXIT,1,{'e'}},KS_NONE},
1086 {"V",N_("ViewLink"),{MC_VIEW_HANDLE,3,{'v',ctrl('m'),ctrl('j')}},KS_NONE},
1087 NULL_MENU,
1088 NULL_MENU,
1089 PREVPAGE_MENU,
1090 NEXTPAGE_MENU,
1091 PRYNTMSG_MENU,
1092 NULL_MENU,
1093 /* TRANSLATORS: show release notes */
1094 {"R",N_("RelNotes"),{MC_RELNOTES,1,{'r'}},KS_NONE},
1095 NULL_MENU,
1097 HELP_MENU,
1098 OTHER_MENU,
1099 NULL_MENU,
1100 NULL_MENU,
1101 NULL_MENU,
1102 NULL_MENU,
1103 NULL_MENU,
1104 NULL_MENU,
1105 NULL_MENU,
1106 NULL_MENU,
1107 HOMEKEY_MENU,
1108 ENDKEY_MENU};
1109 INST_KEY_MENU(nuov_keymenu, nuov_keys);
1112 struct key modal_message_keys[] =
1113 {NULL_MENU,
1114 NULL_MENU,
1115 {"Ret",N_("Finished"),{MC_EXIT,2,{ctrl('m'),ctrl('j')}},KS_NONE},
1116 NULL_MENU,
1117 NULL_MENU,
1118 NULL_MENU,
1119 PREVPAGE_MENU,
1120 NEXTPAGE_MENU,
1121 NULL_MENU,
1122 NULL_MENU,
1123 HOMEKEY_MENU,
1124 ENDKEY_MENU};
1125 INST_KEY_MENU(modal_message_keymenu, modal_message_keys);
1128 struct key ta_keys_lm[] =
1129 {HELP_MENU,
1130 WHEREIS_MENU,
1131 TA_EXIT_MENU,
1132 /* TRANSLATORS: Take this address into the address book */
1133 {"T", N_("Take"), {MC_TAKE,1,{'t'}}, KS_NONE},
1134 TA_PREV_MENU,
1135 TA_NEXT_MENU,
1136 PREVPAGE_MENU,
1137 NEXTPAGE_MENU,
1138 {"X","[" N_("Set/Unset") "]", {MC_CHOICE,3,{'x',ctrl('M'),ctrl('J')}}, KS_NONE},
1139 {"A", N_("SetAll"),{MC_SELALL,1,{'a'}},KS_NONE},
1140 {"U",N_("UnSetAll"),{MC_UNSELALL,1,{'u'}},KS_NONE},
1141 /* TRANSLATORS: The Take Address screen has a Single mode and a
1142 List mode. This command causes us to go into Single mode. */
1143 {"S",N_("SinglMode"),{MC_LISTMODE,1,{'s'}},KS_NONE}};
1144 INST_KEY_MENU(ta_keymenu_lm, ta_keys_lm);
1147 struct key ta_keys_sm[] =
1148 {HELP_MENU,
1149 WHEREIS_MENU,
1150 TA_EXIT_MENU,
1151 {"T","[" N_("Take") "]",{MC_TAKE,3,{'t',ctrl('M'),ctrl('J')}}, KS_NONE},
1152 TA_PREV_MENU,
1153 TA_NEXT_MENU,
1154 PREVPAGE_MENU,
1155 NEXTPAGE_MENU,
1156 NULL_MENU,
1157 NULL_MENU,
1158 NULL_MENU,
1159 /* TRANSLATORS: The Take Address screen has a Single mode and a
1160 List mode. This command causes us to go into List mode. */
1161 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE}};
1162 INST_KEY_MENU(ta_keymenu_sm, ta_keys_sm);
1165 struct key pipe_cancel_keys[] =
1166 {NULL_MENU,
1167 {"^C",N_("Stop Waiting"),{MC_NONE},KS_NONE},
1168 NULL_MENU,
1169 NULL_MENU,
1170 NULL_MENU,
1171 NULL_MENU,
1172 NULL_MENU,
1173 NULL_MENU,
1174 NULL_MENU,
1175 NULL_MENU,
1176 NULL_MENU,
1177 NULL_MENU};
1178 INST_KEY_MENU(pipe_cancel_keymenu, pipe_cancel_keys);
1181 struct key color_pattern_keys[] =
1182 {HELP_MENU,
1183 OTHER_MENU,
1184 EXIT_SETUP_MENU,
1185 /* TRANSLATORS: Change Value */
1186 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1187 PREV_MENU,
1188 NEXT_MENU,
1189 PREVPAGE_MENU,
1190 NEXTPAGE_MENU,
1191 NULL_MENU,
1192 /* TRANSLATORS: Delete Value */
1193 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1194 PRYNTTXT_MENU,
1195 WHEREIS_MENU,
1197 HELP_MENU,
1198 OTHER_MENU,
1199 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
1200 NULL_MENU,
1201 NULL_MENU,
1202 NULL_MENU,
1203 NULL_MENU,
1204 NULL_MENU,
1205 NULL_MENU,
1206 NULL_MENU,
1207 HOMEKEY_MENU,
1208 ENDKEY_MENU};
1209 INST_KEY_MENU(color_pattern_keymenu, color_pattern_keys);
1212 struct key hdr_color_checkbox_keys[] =
1213 {HELP_MENU,
1214 NULL_MENU,
1215 EXIT_SETUP_MENU,
1216 TOGGLEB_MENU,
1217 PREV_MENU,
1218 NEXT_MENU,
1219 PREVPAGE_MENU,
1220 NEXTPAGE_MENU,
1221 HOMEKEY_MENU,
1222 ENDKEY_MENU,
1223 PRYNTTXT_MENU,
1224 WHEREIS_MENU};
1225 INST_KEY_MENU(hdr_color_checkbox_keymenu, hdr_color_checkbox_keys);
1228 struct key kw_color_checkbox_keys[] =
1229 {HELP_MENU,
1230 NULL_MENU,
1231 EXIT_SETUP_MENU,
1232 TOGGLEC_MENU,
1233 PREV_MENU,
1234 NEXT_MENU,
1235 PREVPAGE_MENU,
1236 NEXTPAGE_MENU,
1237 HOMEKEY_MENU,
1238 ENDKEY_MENU,
1239 PRYNTTXT_MENU,
1240 WHEREIS_MENU};
1241 INST_KEY_MENU(kw_color_checkbox_keymenu, kw_color_checkbox_keys);
1244 struct key selectable_bold_checkbox_keys[] =
1245 {HELP_MENU,
1246 NULL_MENU,
1247 EXIT_SETUP_MENU,
1248 TOGGLED_MENU,
1249 PREV_MENU,
1250 NEXT_MENU,
1251 PREVPAGE_MENU,
1252 NEXTPAGE_MENU,
1253 HOMEKEY_MENU,
1254 ENDKEY_MENU,
1255 PRYNTTXT_MENU,
1256 WHEREIS_MENU};
1257 INST_KEY_MENU(selectable_bold_checkbox_keymenu, selectable_bold_checkbox_keys);
1260 struct key flag_keys[] =
1261 {HELP_MENU,
1262 {"A", N_("Add KW"), {MC_ADD,1,{'a'}}, KS_NONE},
1263 /* TRANSLATORS: Exit from the Flags screen */
1264 {"E", N_("Exit Flags"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1265 TOGGLE_MENU,
1266 PREV_MENU,
1267 NEXT_MENU,
1268 PREVPAGE_MENU,
1269 NEXTPAGE_MENU,
1270 HOMEKEY_MENU,
1271 ENDKEY_MENU,
1272 PRYNTTXT_MENU,
1273 WHEREIS_MENU};
1274 INST_KEY_MENU(flag_keymenu, flag_keys);
1277 struct key addr_select_keys[] =
1278 {HELP_MENU,
1279 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1280 NULL_MENU,
1281 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1282 PREV_MENU,
1283 NEXT_MENU,
1284 PREVPAGE_MENU,
1285 NEXTPAGE_MENU,
1286 HOMEKEY_MENU,
1287 ENDKEY_MENU,
1288 NULL_MENU,
1289 WHEREIS_MENU};
1290 INST_KEY_MENU(addr_s_km, addr_select_keys);
1293 struct key addr_select_with_goback_keys[] =
1294 {HELP_MENU,
1295 NULL_MENU,
1296 /* TRANSLATORS: go to address book list */
1297 {"<", N_("AddressBkList"), {MC_ADDRBOOK,2,{'<',','}}, KS_NONE},
1298 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1299 PREV_MENU,
1300 NEXT_MENU,
1301 PREVPAGE_MENU,
1302 NEXTPAGE_MENU,
1303 HOMEKEY_MENU,
1304 ENDKEY_MENU,
1305 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1306 WHEREIS_MENU};
1307 INST_KEY_MENU(addr_s_km_with_goback, addr_select_with_goback_keys);
1309 static struct key addr_select_with_view_keys[] =
1310 {HELP_MENU,
1311 RCOMPOSE_MENU,
1312 {"<", N_("AddressBkList"), {MC_ADDRBOOK,2,{'<',','}}, KS_NONE},
1313 {">", "[" N_("View") "]",
1314 {MC_VIEW_TEXT,5,{'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
1315 PREV_MENU,
1316 NEXT_MENU,
1317 PREVPAGE_MENU,
1318 NEXTPAGE_MENU,
1319 /* TRANSLATORS: compose a message to the current address */
1320 {"C", N_("ComposeTo"), {MC_COMPOSE,1,{'c'}}, KS_COMPOSER},
1321 FWDEMAIL_MENU,
1322 SAVE_MENU,
1323 WHEREIS_MENU,
1325 HELP_MENU,
1326 OTHER_MENU,
1327 NULL_MENU,
1328 NULL_MENU,
1329 NULL_MENU,
1330 NULL_MENU,
1331 NULL_MENU,
1332 NULL_MENU,
1333 NULL_MENU,
1334 NULL_MENU,
1335 HOMEKEY_MENU,
1336 ENDKEY_MENU};
1337 INST_KEY_MENU(addr_s_km_with_view, addr_select_with_view_keys);
1340 struct key addr_select_for_url_keys[] =
1341 {HELP_MENU,
1342 RCOMPOSE_MENU,
1343 {"<", N_("Exit Viewer"), {MC_ADDRBOOK,3,{'<',',','e'}}, KS_NONE},
1344 {">", "[" N_("View") "]",
1345 {MC_VIEW_TEXT,5,{'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
1346 PREV_MENU,
1347 NEXT_MENU,
1348 PREVPAGE_MENU,
1349 NEXTPAGE_MENU,
1350 {"C", N_("ComposeTo"), {MC_COMPOSE,1,{'c'}}, KS_COMPOSER},
1351 FWDEMAIL_MENU,
1352 SAVE_MENU,
1353 WHEREIS_MENU,
1355 HELP_MENU,
1356 OTHER_MENU,
1357 NULL_MENU,
1358 NULL_MENU,
1359 NULL_MENU,
1360 NULL_MENU,
1361 NULL_MENU,
1362 NULL_MENU,
1363 NULL_MENU,
1364 NULL_MENU,
1365 HOMEKEY_MENU,
1366 ENDKEY_MENU};
1367 INST_KEY_MENU(addr_s_km_for_url, addr_select_for_url_keys);
1370 struct key addr_select_exit_keys[] =
1371 {NULL_MENU,
1372 NULL_MENU,
1373 {"E", "[" N_("Exit") "]", {MC_EXIT,3,{'e',ctrl('M'),ctrl('J')}},
1374 KS_EXITMODE},
1375 NULL_MENU,
1376 NULL_MENU,
1377 NULL_MENU,
1378 NULL_MENU,
1379 NULL_MENU,
1380 NULL_MENU,
1381 NULL_MENU,
1382 NULL_MENU,
1383 NULL_MENU};
1384 INST_KEY_MENU(addr_s_km_exit, addr_select_exit_keys);
1387 struct key addr_select_goback_keys[] =
1388 {NULL_MENU,
1389 NULL_MENU,
1390 {"E", "[" N_("Exit") "]", {MC_ADDRBOOK,3,{'e',ctrl('M'),ctrl('J')}},
1391 KS_EXITMODE},
1392 NULL_MENU,
1393 NULL_MENU,
1394 NULL_MENU,
1395 NULL_MENU,
1396 NULL_MENU,
1397 NULL_MENU,
1398 NULL_MENU,
1399 NULL_MENU,
1400 NULL_MENU};
1401 INST_KEY_MENU(addr_s_km_goback, addr_select_goback_keys);
1404 struct key config_text_keys[] =
1405 {HELP_MENU,
1406 OTHER_MENU,
1407 EXIT_SETUP_MENU,
1408 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1409 PREV_MENU,
1410 NEXT_MENU,
1411 PREVPAGE_MENU,
1412 NEXTPAGE_MENU,
1413 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1414 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1415 PRYNTTXT_MENU,
1416 WHEREIS_MENU,
1418 HELP_MENU,
1419 OTHER_MENU,
1420 NULL_MENU,
1421 NULL_MENU,
1422 NULL_MENU,
1423 NULL_MENU,
1424 NULL_MENU,
1425 NULL_MENU,
1426 NULL_MENU,
1427 NULL_MENU,
1428 HOMEKEY_MENU,
1429 ENDKEY_MENU};
1430 INST_KEY_MENU(config_text_keymenu, config_text_keys);
1432 struct key config_xoauth2_text_keys[] =
1433 {HELP_MENU,
1434 OTHER_MENU,
1435 EXIT_SETUP_MENU,
1436 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1437 PREV_MENU,
1438 NEXT_MENU,
1439 PREVPAGE_MENU,
1440 NEXTPAGE_MENU,
1441 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1442 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1443 PRYNTTXT_MENU,
1444 WHEREIS_MENU,
1446 HELP_MENU,
1447 OTHER_MENU,
1448 {"^A", N_("Add Server"), {MC_XSADD,1,{ctrl('A')}}, KS_NONE},
1449 {"^D", N_("Del Server"), {MC_XSDELETE,1,{ctrl('d')}}, KS_NONE},
1450 NULL_MENU,
1451 {"^H", N_("Conf Help"), {MC_XSHELP,1,{ctrl('h')}}, KS_NONE},
1452 NULL_MENU,
1453 NULL_MENU,
1454 NULL_MENU,
1455 NULL_MENU,
1456 HOMEKEY_MENU,
1457 ENDKEY_MENU};
1458 INST_KEY_MENU(config_xoauth2_text_keymenu, config_xoauth2_text_keys);
1461 struct key config_text_to_charsets_keys[] =
1462 {HELP_MENU,
1463 OTHER_MENU,
1464 EXIT_SETUP_MENU,
1465 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1466 PREV_MENU,
1467 NEXT_MENU,
1468 PREVPAGE_MENU,
1469 NEXTPAGE_MENU,
1470 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1471 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1472 PRYNTTXT_MENU,
1473 WHEREIS_MENU,
1475 HELP_MENU,
1476 OTHER_MENU,
1477 NULL_MENU,
1478 NULL_MENU,
1479 /* TRANSLATORS: go to list of keywords */
1480 {"T", N_("ToCharsets"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1481 NULL_MENU,
1482 NULL_MENU,
1483 NULL_MENU,
1484 NULL_MENU,
1485 NULL_MENU,
1486 HOMEKEY_MENU,
1487 ENDKEY_MENU};
1488 INST_KEY_MENU(config_text_to_charsets_keymenu, config_text_to_charsets_keys);
1491 struct key direct_config_keys[] =
1492 {HELP_MENU,
1493 NULL_MENU,
1494 {"E", N_("Exit Setup"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1495 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1496 /* TRANSLATORS: go to previous LDAP directory server in the list */
1497 {"P", N_("PrevDir"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1498 {"N", N_("NextDir"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1499 PREVPAGE_MENU,
1500 NEXTPAGE_MENU,
1501 /* TRANSLATORS: add a directory server to configuration */
1502 {"A", N_("Add Dir"), {MC_ADD,1,{'a'}}, KS_NONE},
1503 /* TRANSLATORS: delete a directory */
1504 {"D", N_("Del Dir"), {MC_DELETE,1,{'d'}}, KS_NONE},
1505 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1506 WHEREIS_MENU,
1508 HELP_MENU,
1509 OTHER_MENU,
1510 NULL_MENU,
1511 NULL_MENU,
1512 NULL_MENU,
1513 NULL_MENU,
1514 NULL_MENU,
1515 NULL_MENU,
1516 NULL_MENU,
1517 NULL_MENU,
1518 HOMEKEY_MENU,
1519 ENDKEY_MENU};
1520 INST_KEY_MENU(dir_conf_km, direct_config_keys);
1523 struct key sel_from_list_keys[] =
1524 {HELP_MENU,
1525 NULL_MENU,
1526 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1527 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1528 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1529 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1530 PREVPAGE_MENU,
1531 NEXTPAGE_MENU,
1532 HOMEKEY_MENU,
1533 ENDKEY_MENU,
1534 PRYNTTXT_MENU,
1535 WHEREIS_MENU};
1536 INST_KEY_MENU(sel_from_list, sel_from_list_keys);
1539 struct key sel_from_list_keys_ctrlc[] =
1540 {HELP_MENU,
1541 NULL_MENU,
1542 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1543 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1544 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1545 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1546 PREVPAGE_MENU,
1547 NEXTPAGE_MENU,
1548 HOMEKEY_MENU,
1549 ENDKEY_MENU,
1550 PRYNTTXT_MENU,
1551 WHEREIS_MENU};
1552 INST_KEY_MENU(sel_from_list_ctrlc, sel_from_list_keys_ctrlc);
1555 struct key sel_from_list_keys_sm[] =
1556 {HELP_MENU,
1557 OTHER_MENU,
1558 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1559 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1560 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1561 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1562 PREVPAGE_MENU,
1563 NEXTPAGE_MENU,
1564 NULL_MENU,
1565 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE},
1566 PRYNTTXT_MENU,
1567 WHEREIS_MENU,
1569 HELP_MENU,
1570 OTHER_MENU,
1571 NULL_MENU,
1572 NULL_MENU,
1573 NULL_MENU,
1574 NULL_MENU,
1575 NULL_MENU,
1576 NULL_MENU,
1577 NULL_MENU,
1578 NULL_MENU,
1579 HOMEKEY_MENU,
1580 ENDKEY_MENU};
1581 INST_KEY_MENU(sel_from_list_sm, sel_from_list_keys_sm);
1584 struct key sel_from_list_keys_sm_ctrlc[] =
1585 {HELP_MENU,
1586 OTHER_MENU,
1587 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1588 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1589 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1590 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1591 PREVPAGE_MENU,
1592 NEXTPAGE_MENU,
1593 NULL_MENU,
1594 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE},
1595 PRYNTTXT_MENU,
1596 WHEREIS_MENU,
1598 HELP_MENU,
1599 OTHER_MENU,
1600 NULL_MENU,
1601 NULL_MENU,
1602 NULL_MENU,
1603 NULL_MENU,
1604 NULL_MENU,
1605 NULL_MENU,
1606 NULL_MENU,
1607 NULL_MENU,
1608 HOMEKEY_MENU,
1609 ENDKEY_MENU};
1610 INST_KEY_MENU(sel_from_list_sm_ctrlc, sel_from_list_keys_sm_ctrlc);
1613 struct key sel_from_list_keys_lm[] =
1614 {HELP_MENU,
1615 OTHER_MENU,
1616 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1617 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1618 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1619 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1620 PREVPAGE_MENU,
1621 NEXTPAGE_MENU,
1622 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1623 {"1",N_("SinglMode"),{MC_LISTMODE,1,{'1'}},KS_NONE},
1624 PRYNTTXT_MENU,
1625 WHEREIS_MENU,
1627 HELP_MENU,
1628 OTHER_MENU,
1629 NULL_MENU,
1630 NULL_MENU,
1631 NULL_MENU,
1632 NULL_MENU,
1633 NULL_MENU,
1634 NULL_MENU,
1635 NULL_MENU,
1636 NULL_MENU,
1637 HOMEKEY_MENU,
1638 ENDKEY_MENU};
1639 INST_KEY_MENU(sel_from_list_lm, sel_from_list_keys_lm);
1642 struct key sel_from_list_keys_lm_ctrlc[] =
1643 {HELP_MENU,
1644 OTHER_MENU,
1645 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1646 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1647 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1648 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1649 PREVPAGE_MENU,
1650 NEXTPAGE_MENU,
1651 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1652 {"1",N_("SinglMode"),{MC_LISTMODE,1,{'1'}},KS_NONE},
1653 PRYNTTXT_MENU,
1654 WHEREIS_MENU,
1656 HELP_MENU,
1657 OTHER_MENU,
1658 NULL_MENU,
1659 NULL_MENU,
1660 NULL_MENU,
1661 NULL_MENU,
1662 NULL_MENU,
1663 NULL_MENU,
1664 NULL_MENU,
1665 NULL_MENU,
1666 HOMEKEY_MENU,
1667 ENDKEY_MENU};
1668 INST_KEY_MENU(sel_from_list_lm_ctrlc, sel_from_list_keys_lm_ctrlc);
1671 struct key sel_from_list_keys_olm[] =
1672 {HELP_MENU,
1673 OTHER_MENU,
1674 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1675 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1676 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1677 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1678 PREVPAGE_MENU,
1679 NEXTPAGE_MENU,
1680 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1681 NULL_MENU,
1682 PRYNTTXT_MENU,
1683 WHEREIS_MENU,
1685 HELP_MENU,
1686 OTHER_MENU,
1687 NULL_MENU,
1688 NULL_MENU,
1689 NULL_MENU,
1690 NULL_MENU,
1691 NULL_MENU,
1692 NULL_MENU,
1693 NULL_MENU,
1694 NULL_MENU,
1695 HOMEKEY_MENU,
1696 ENDKEY_MENU};
1697 INST_KEY_MENU(sel_from_list_olm, sel_from_list_keys_olm);
1700 struct key sel_from_list_keys_olm_ctrlc[] =
1701 {HELP_MENU,
1702 OTHER_MENU,
1703 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1704 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1705 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1706 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1707 PREVPAGE_MENU,
1708 NEXTPAGE_MENU,
1709 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1710 NULL_MENU,
1711 PRYNTTXT_MENU,
1712 WHEREIS_MENU,
1714 HELP_MENU,
1715 OTHER_MENU,
1716 NULL_MENU,
1717 NULL_MENU,
1718 NULL_MENU,
1719 NULL_MENU,
1720 NULL_MENU,
1721 NULL_MENU,
1722 NULL_MENU,
1723 NULL_MENU,
1724 HOMEKEY_MENU,
1725 ENDKEY_MENU};
1726 INST_KEY_MENU(sel_from_list_olm_ctrlc, sel_from_list_keys_olm_ctrlc);
1729 #ifndef DOS
1731 struct key printer_edit_keys[] =
1732 {HELP_MENU,
1733 PRYNTTXT_MENU,
1734 EXIT_SETUP_MENU,
1735 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1736 PREV_MENU,
1737 NEXT_MENU,
1738 PREVPAGE_MENU,
1739 NEXTPAGE_MENU,
1740 /* TRANSLATORS: add a printer to configuration */
1741 {"A", N_("Add Printer"), {MC_ADD,1,{'a'}}, KS_NONE},
1742 /* TRANSLATORS: delete a printer from configuration */
1743 {"D", N_("DeletePrint"), {MC_DELETE,1,{'d'}}, KS_NONE},
1744 {"C", N_("Change"), {MC_EDIT,1,{'c'}}, KS_NONE},
1745 WHEREIS_MENU,
1747 HELP_MENU,
1748 OTHER_MENU,
1749 NULL_MENU,
1750 NULL_MENU,
1751 NULL_MENU,
1752 NULL_MENU,
1753 NULL_MENU,
1754 NULL_MENU,
1755 NULL_MENU,
1756 NULL_MENU,
1757 HOMEKEY_MENU,
1758 ENDKEY_MENU};
1759 INST_KEY_MENU(printer_edit_keymenu, printer_edit_keys);
1762 struct key printer_select_keys[] =
1763 {HELP_MENU,
1764 PRYNTTXT_MENU,
1765 EXIT_SETUP_MENU,
1766 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1767 PREV_MENU,
1768 NEXT_MENU,
1769 PREVPAGE_MENU,
1770 NEXTPAGE_MENU,
1771 HOMEKEY_MENU,
1772 ENDKEY_MENU,
1773 NULL_MENU,
1774 WHEREIS_MENU};
1775 INST_KEY_MENU(printer_select_keymenu, printer_select_keys);
1777 #endif /* !DOS */
1780 struct key role_select_keys[] =
1781 {HELP_MENU,
1782 NULL_MENU,
1783 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1784 NULL_MENU,
1785 /* TRANSLATORS: go to previous Role in list */
1786 {"P", N_("PrevRole"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1787 {"N", N_("NextRole"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1788 PREVPAGE_MENU,
1789 NEXTPAGE_MENU,
1790 HOMEKEY_MENU,
1791 ENDKEY_MENU,
1792 {"D", "", {MC_TOGGLE, 1, {'d'}}, KS_NONE},
1793 WHEREIS_MENU};
1794 INST_KEY_MENU(role_select_km, role_select_keys);
1796 struct key xoauth2_flow_select_keys[] =
1797 {HELP_MENU,
1798 NULL_MENU,
1799 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1800 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1801 {"P", N_("PrevFlow"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1802 {"N", N_("NextFlow"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1803 PREVPAGE_MENU,
1804 NEXTPAGE_MENU,
1805 HOMEKEY_MENU,
1806 ENDKEY_MENU,
1807 NULL_MENU,
1808 WHEREIS_MENU};
1809 INST_KEY_MENU(xoauth2_flow_select_km, xoauth2_flow_select_keys);
1811 struct key xoauth2_id_select_keys[] =
1812 {HELP_MENU,
1813 NULL_MENU,
1814 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1815 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1816 {"P", N_("PrevID"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1817 {"N", N_("NextID"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1818 PREVPAGE_MENU,
1819 NEXTPAGE_MENU,
1820 HOMEKEY_MENU,
1821 ENDKEY_MENU,
1822 NULL_MENU,
1823 WHEREIS_MENU};
1824 INST_KEY_MENU(xoauth2_id_select_km, xoauth2_id_select_keys);
1827 struct key role_config_keys[] =
1828 {HELP_MENU,
1829 OTHER_MENU,
1830 {"E", N_("Exit Setup"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1831 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1832 /* TRANSLATORS: go to previous Rule in list */
1833 {"P", N_("PrevRule"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1834 {"N", N_("NextRule"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1835 PREVPAGE_MENU,
1836 NEXTPAGE_MENU,
1837 {"A", N_("Add"), {MC_ADD,1,{'a'}}, KS_NONE},
1838 {"D", N_("Delete"), {MC_DELETE,1,{'d'}}, KS_NONE},
1839 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1840 WHEREIS_MENU,
1842 HELP_MENU,
1843 OTHER_MENU,
1844 NULL_MENU,
1845 NULL_MENU,
1846 /* TRANSLATORS: Include a File from filesystem */
1847 {"I", N_("IncludeFile"), {MC_ADDFILE,1,{'i'}}, KS_NONE},
1848 {"X", N_("eXcludeFile"), {MC_DELFILE,1,{'x'}}, KS_NONE},
1849 NULL_MENU,
1850 NULL_MENU,
1851 {"R", N_("Replicate"), {MC_COPY,1,{'r'}}, KS_NONE},
1852 NULL_MENU,
1853 HOMEKEY_MENU,
1854 ENDKEY_MENU};
1855 INST_KEY_MENU(role_conf_km, role_config_keys);
1858 struct key config_text_wshuf_keys[] =
1859 {HELP_MENU,
1860 OTHER_MENU,
1861 EXIT_SETUP_MENU,
1862 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1863 PREV_MENU,
1864 NEXT_MENU,
1865 PREVPAGE_MENU,
1866 NEXTPAGE_MENU,
1867 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1868 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1869 PRYNTTXT_MENU,
1870 WHEREIS_MENU,
1872 HELP_MENU,
1873 OTHER_MENU,
1874 NULL_MENU,
1875 NULL_MENU,
1876 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1877 NULL_MENU,
1878 NULL_MENU,
1879 NULL_MENU,
1880 NULL_MENU,
1881 NULL_MENU,
1882 HOMEKEY_MENU,
1883 ENDKEY_MENU};
1884 INST_KEY_MENU(config_text_wshuf_keymenu, config_text_wshuf_keys);
1886 struct key config_xoauth2_wshuf_keys[] =
1887 {HELP_MENU,
1888 OTHER_MENU,
1889 EXIT_SETUP_MENU,
1890 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1891 PREV_MENU,
1892 NEXT_MENU,
1893 PREVPAGE_MENU,
1894 NEXTPAGE_MENU,
1895 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1896 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1897 PRYNTTXT_MENU,
1898 WHEREIS_MENU,
1900 HELP_MENU,
1901 OTHER_MENU,
1902 {"^A", N_("Add Server"), {MC_XSADD,1,{ctrl('A')}}, KS_NONE},
1903 {"^D", N_("Del Server"), {MC_XSDELETE,1,{ctrl('d')}}, KS_NONE},
1904 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1905 {"^H", N_("Conf Help"), {MC_XSHELP,1,{ctrl('h')}}, KS_NONE},
1906 NULL_MENU,
1907 NULL_MENU,
1908 NULL_MENU,
1909 NULL_MENU,
1910 HOMEKEY_MENU,
1911 ENDKEY_MENU};
1912 INST_KEY_MENU(config_xoauth2_wshuf_keymenu, config_xoauth2_wshuf_keys);
1914 struct key config_text_wshufandfldr_keys[] =
1915 {HELP_MENU,
1916 OTHER_MENU,
1917 EXIT_SETUP_MENU,
1918 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1919 PREV_MENU,
1920 NEXT_MENU,
1921 PREVPAGE_MENU,
1922 NEXTPAGE_MENU,
1923 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1924 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1925 PRYNTTXT_MENU,
1926 WHEREIS_MENU,
1928 HELP_MENU,
1929 OTHER_MENU,
1930 NULL_MENU,
1931 NULL_MENU,
1932 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1933 {"T", N_("ToFldrs"), {MC_CHOICE,2,{'t', ctrl('T')}}, KS_NONE},
1934 NULL_MENU,
1935 NULL_MENU,
1936 NULL_MENU,
1937 NULL_MENU,
1938 HOMEKEY_MENU,
1939 ENDKEY_MENU};
1940 INST_KEY_MENU(config_text_wshufandfldr_keymenu, config_text_wshufandfldr_keys);
1943 struct key config_role_file_keys[] =
1944 {HELP_MENU,
1945 OTHER_MENU,
1946 EXIT_SETUP_MENU,
1947 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1948 PREV_MENU,
1949 NEXT_MENU,
1950 PREVPAGE_MENU,
1951 NEXTPAGE_MENU,
1952 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1953 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1954 PRYNTTXT_MENU,
1955 WHEREIS_MENU,
1957 HELP_MENU,
1958 OTHER_MENU,
1959 NULL_MENU,
1960 NULL_MENU,
1961 /* TRANSLATORS: go to list of Files */
1962 {"T", N_("ToFiles"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1963 /* TRANSLATORS: edit a file */
1964 {"F", N_("editFile"), {MC_EDITFILE, 1, {'f'}}, KS_NONE},
1965 NULL_MENU,
1966 NULL_MENU,
1967 NULL_MENU,
1968 NULL_MENU,
1969 HOMEKEY_MENU,
1970 ENDKEY_MENU};
1971 INST_KEY_MENU(config_role_file_keymenu, config_role_file_keys);
1974 struct key config_role_file_res_keys[] =
1975 {HELP_MENU,
1976 OTHER_MENU,
1977 EXIT_SETUP_MENU,
1978 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1979 PREV_MENU,
1980 NEXT_MENU,
1981 PREVPAGE_MENU,
1982 NEXTPAGE_MENU,
1983 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1984 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1985 PRYNTTXT_MENU,
1986 WHEREIS_MENU,
1988 HELP_MENU,
1989 OTHER_MENU,
1990 NULL_MENU,
1991 NULL_MENU,
1992 {"T", N_("ToFiles"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1993 NULL_MENU,
1994 NULL_MENU,
1995 NULL_MENU,
1996 NULL_MENU,
1997 NULL_MENU,
1998 HOMEKEY_MENU,
1999 ENDKEY_MENU};
2000 INST_KEY_MENU(config_role_file_res_keymenu, config_role_file_res_keys);
2003 struct key config_role_keyword_keys[] =
2004 {HELP_MENU,
2005 OTHER_MENU,
2006 EXIT_SETUP_MENU,
2007 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2008 PREV_MENU,
2009 NEXT_MENU,
2010 PREVPAGE_MENU,
2011 NEXTPAGE_MENU,
2012 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2013 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2014 PRYNTTXT_MENU,
2015 WHEREIS_MENU,
2017 HELP_MENU,
2018 OTHER_MENU,
2019 NULL_MENU,
2020 NULL_MENU,
2021 /* TRANSLATORS: go to list of keywords */
2022 {"T", N_("ToKeywords"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2023 NULL_MENU,
2024 NULL_MENU,
2025 NULL_MENU,
2026 NULL_MENU,
2027 NULL_MENU,
2028 HOMEKEY_MENU,
2029 ENDKEY_MENU};
2030 INST_KEY_MENU(config_role_keyword_keymenu, config_role_keyword_keys);
2033 struct key config_role_keyword_keys_not[] =
2034 {HELP_MENU,
2035 OTHER_MENU,
2036 EXIT_SETUP_MENU,
2037 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2038 PREV_MENU,
2039 NEXT_MENU,
2040 PREVPAGE_MENU,
2041 NEXTPAGE_MENU,
2042 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2043 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2044 PRYNTTXT_MENU,
2045 WHEREIS_MENU,
2047 HELP_MENU,
2048 OTHER_MENU,
2049 NULL_MENU,
2050 NULL_MENU,
2051 {"T", N_("ToKeywords"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2052 NULL_MENU,
2053 /* TRANSLATORS: toggle between NOT and not NOT, turn NOT on or off */
2054 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2055 NULL_MENU,
2056 NULL_MENU,
2057 NULL_MENU,
2058 HOMEKEY_MENU,
2059 ENDKEY_MENU};
2060 INST_KEY_MENU(config_role_keyword_keymenu_not, config_role_keyword_keys_not);
2063 struct key config_role_charset_keys_not[] =
2064 {HELP_MENU,
2065 OTHER_MENU,
2066 EXIT_SETUP_MENU,
2067 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2068 PREV_MENU,
2069 NEXT_MENU,
2070 PREVPAGE_MENU,
2071 NEXTPAGE_MENU,
2072 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2073 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2074 PRYNTTXT_MENU,
2075 WHEREIS_MENU,
2077 HELP_MENU,
2078 OTHER_MENU,
2079 NULL_MENU,
2080 NULL_MENU,
2081 /* TRANSLATORS: go to list of character sets */
2082 {"T", N_("ToCharSets"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2083 NULL_MENU,
2084 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2085 NULL_MENU,
2086 NULL_MENU,
2087 NULL_MENU,
2088 HOMEKEY_MENU,
2089 ENDKEY_MENU};
2090 INST_KEY_MENU(config_role_charset_keymenu_not, config_role_charset_keys_not);
2093 struct key config_role_keys[] =
2094 {HELP_MENU,
2095 OTHER_MENU,
2096 EXIT_SETUP_MENU,
2097 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2098 PREV_MENU,
2099 NEXT_MENU,
2100 PREVPAGE_MENU,
2101 NEXTPAGE_MENU,
2102 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2103 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2104 PRYNTTXT_MENU,
2105 WHEREIS_MENU,
2107 HELP_MENU,
2108 OTHER_MENU,
2109 NULL_MENU,
2110 NULL_MENU,
2111 NULL_MENU,
2112 NULL_MENU,
2113 NULL_MENU,
2114 NULL_MENU,
2115 NULL_MENU,
2116 NULL_MENU,
2117 HOMEKEY_MENU,
2118 ENDKEY_MENU};
2119 INST_KEY_MENU(config_role_keymenu, config_role_keys);
2122 struct key config_role_keys_not[] =
2123 {HELP_MENU,
2124 OTHER_MENU,
2125 EXIT_SETUP_MENU,
2126 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2127 PREV_MENU,
2128 NEXT_MENU,
2129 PREVPAGE_MENU,
2130 NEXTPAGE_MENU,
2131 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2132 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2133 PRYNTTXT_MENU,
2134 WHEREIS_MENU,
2136 HELP_MENU,
2137 OTHER_MENU,
2138 NULL_MENU,
2139 NULL_MENU,
2140 NULL_MENU,
2141 /* TRANSLATORS: add extra headers to list */
2142 {"X", N_("eXtraHdr"), {MC_ADDHDR, 1, {'x'}}, KS_NONE},
2143 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2144 NULL_MENU,
2145 NULL_MENU,
2146 NULL_MENU,
2147 HOMEKEY_MENU,
2148 ENDKEY_MENU};
2149 INST_KEY_MENU(config_role_keymenu_not, config_role_keys_not);
2152 struct key config_role_keys_extra[] =
2153 {HELP_MENU,
2154 NULL_MENU,
2155 EXIT_SETUP_MENU,
2156 {"X", "[" N_("eXtraHdr") "]", {MC_ADDHDR, 3,{'x',ctrl('M'),ctrl('J')}}, KS_NONE},
2157 PREV_MENU,
2158 NEXT_MENU,
2159 PREVPAGE_MENU,
2160 NEXTPAGE_MENU,
2161 HOMEKEY_MENU,
2162 ENDKEY_MENU,
2163 PRYNTTXT_MENU,
2164 WHEREIS_MENU};
2165 INST_KEY_MENU(config_role_keymenu_extra, config_role_keys_extra);
2168 struct key config_role_addr_pat_keys[] =
2169 {HELP_MENU,
2170 OTHER_MENU,
2171 EXIT_SETUP_MENU,
2172 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2173 PREV_MENU,
2174 NEXT_MENU,
2175 PREVPAGE_MENU,
2176 NEXTPAGE_MENU,
2177 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2178 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2179 PRYNTTXT_MENU,
2180 WHEREIS_MENU,
2182 HELP_MENU,
2183 OTHER_MENU,
2184 NULL_MENU,
2185 NULL_MENU,
2186 /* TRANSLATORS: go to address book to get address */
2187 {"T", N_("ToAddrBk"), {MC_CHOICEB, 2, {'t', ctrl('T')}}, KS_NONE},
2188 {"X", N_("eXtraHdr"), {MC_ADDHDR, 1, {'x'}}, KS_NONE},
2189 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2190 NULL_MENU,
2191 NULL_MENU,
2192 NULL_MENU,
2193 HOMEKEY_MENU,
2194 ENDKEY_MENU};
2195 INST_KEY_MENU(config_role_addr_pat_keymenu, config_role_addr_pat_keys);
2198 struct key config_role_xtrahdr_keys[] =
2199 {HELP_MENU,
2200 OTHER_MENU,
2201 EXIT_SETUP_MENU,
2202 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2203 PREV_MENU,
2204 NEXT_MENU,
2205 PREVPAGE_MENU,
2206 NEXTPAGE_MENU,
2207 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2208 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2209 PRYNTTXT_MENU,
2210 WHEREIS_MENU,
2212 HELP_MENU,
2213 OTHER_MENU,
2214 NULL_MENU,
2215 NULL_MENU,
2216 NULL_MENU,
2217 {"X", N_("eXtraHdr"), {MC_ADDHDR, 1, {'x'}}, KS_NONE},
2218 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2219 NULL_MENU,
2220 /* TRANSLATORS: remove a header we previously added */
2221 {"R", N_("RemoveHdr"), {MC_DELHDR, 1, {'r'}}, KS_NONE},
2222 NULL_MENU,
2223 HOMEKEY_MENU,
2224 ENDKEY_MENU};
2225 INST_KEY_MENU(config_role_xtrahdr_keymenu, config_role_xtrahdr_keys);
2228 struct key config_role_addr_act_keys[] =
2229 {HELP_MENU,
2230 OTHER_MENU,
2231 EXIT_SETUP_MENU,
2232 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2233 PREV_MENU,
2234 NEXT_MENU,
2235 PREVPAGE_MENU,
2236 NEXTPAGE_MENU,
2237 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2238 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2239 PRYNTTXT_MENU,
2240 WHEREIS_MENU,
2242 HELP_MENU,
2243 OTHER_MENU,
2244 NULL_MENU,
2245 NULL_MENU,
2246 {"T", N_("ToAddrBk"), {MC_CHOICEC, 2, {'t', ctrl('T')}}, KS_NONE},
2247 NULL_MENU,
2248 NULL_MENU,
2249 NULL_MENU,
2250 NULL_MENU,
2251 NULL_MENU,
2252 HOMEKEY_MENU,
2253 ENDKEY_MENU};
2254 INST_KEY_MENU(config_role_addr_act_keymenu, config_role_addr_act_keys);
2257 struct key config_role_patfolder_keys[] =
2258 {HELP_MENU,
2259 OTHER_MENU,
2260 EXIT_SETUP_MENU,
2261 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2262 PREV_MENU,
2263 NEXT_MENU,
2264 PREVPAGE_MENU,
2265 NEXTPAGE_MENU,
2266 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2267 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2268 PRYNTTXT_MENU,
2269 WHEREIS_MENU,
2271 HELP_MENU,
2272 OTHER_MENU,
2273 NULL_MENU,
2274 NULL_MENU,
2275 /* TRANSLATORS: go to list of folders */
2276 {"T", N_("ToFldrs"), {MC_CHOICED, 2, {'t', ctrl('T')}}, KS_NONE},
2277 NULL_MENU,
2278 NULL_MENU,
2279 NULL_MENU,
2280 NULL_MENU,
2281 NULL_MENU,
2282 HOMEKEY_MENU,
2283 ENDKEY_MENU};
2284 INST_KEY_MENU(config_role_patfolder_keymenu, config_role_patfolder_keys);
2287 struct key config_role_actionfolder_keys[] =
2288 {HELP_MENU,
2289 OTHER_MENU,
2290 EXIT_SETUP_MENU,
2291 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2292 PREV_MENU,
2293 NEXT_MENU,
2294 PREVPAGE_MENU,
2295 NEXTPAGE_MENU,
2296 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2297 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2298 PRYNTTXT_MENU,
2299 WHEREIS_MENU,
2301 HELP_MENU,
2302 OTHER_MENU,
2303 NULL_MENU,
2304 NULL_MENU,
2305 {"T", N_("ToFldrs"), {MC_CHOICEE, 2, {'t', ctrl('T')}}, KS_NONE},
2306 NULL_MENU,
2307 NULL_MENU,
2308 NULL_MENU,
2309 NULL_MENU,
2310 NULL_MENU,
2311 HOMEKEY_MENU,
2312 ENDKEY_MENU};
2313 INST_KEY_MENU(config_role_actionfolder_keymenu, config_role_actionfolder_keys);
2316 struct key config_role_inick_keys[] =
2317 {HELP_MENU,
2318 OTHER_MENU,
2319 EXIT_SETUP_MENU,
2320 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2321 PREV_MENU,
2322 NEXT_MENU,
2323 PREVPAGE_MENU,
2324 NEXTPAGE_MENU,
2325 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2326 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2327 PRYNTTXT_MENU,
2328 WHEREIS_MENU,
2330 HELP_MENU,
2331 OTHER_MENU,
2332 NULL_MENU,
2333 NULL_MENU,
2334 /* TRANSLATORS: go to list of nicknames */
2335 {"T", N_("ToNicks"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2336 NULL_MENU,
2337 NULL_MENU,
2338 NULL_MENU,
2339 NULL_MENU,
2340 NULL_MENU,
2341 HOMEKEY_MENU,
2342 ENDKEY_MENU};
2343 INST_KEY_MENU(config_role_inick_keymenu, config_role_inick_keys);
2346 struct key config_role_afrom_keys[] =
2347 {HELP_MENU,
2348 OTHER_MENU,
2349 EXIT_SETUP_MENU,
2350 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2351 PREV_MENU,
2352 NEXT_MENU,
2353 PREVPAGE_MENU,
2354 NEXTPAGE_MENU,
2355 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2356 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2357 PRYNTTXT_MENU,
2358 WHEREIS_MENU,
2360 HELP_MENU,
2361 OTHER_MENU,
2362 NULL_MENU,
2363 NULL_MENU,
2364 /* TRANSLATORS: go to list of address books */
2365 {"T", N_("ToAbookList"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2366 NULL_MENU,
2367 NULL_MENU,
2368 NULL_MENU,
2369 NULL_MENU,
2370 NULL_MENU,
2371 HOMEKEY_MENU,
2372 ENDKEY_MENU};
2373 INST_KEY_MENU(config_role_afrom_keymenu, config_role_afrom_keys);
2376 struct key config_checkbox_keys[] =
2377 {HELP_MENU,
2378 NULL_MENU,
2379 EXIT_SETUP_MENU,
2380 TOGGLE_MENU,
2381 PREV_MENU,
2382 NEXT_MENU,
2383 PREVPAGE_MENU,
2384 NEXTPAGE_MENU,
2385 HOMEKEY_MENU,
2386 ENDKEY_MENU,
2387 PRYNTTXT_MENU,
2388 WHEREIS_MENU};
2389 INST_KEY_MENU(config_checkbox_keymenu, config_checkbox_keys);
2392 struct key config_radiobutton_keys[] =
2393 {HELP_MENU,
2394 NULL_MENU,
2395 EXIT_SETUP_MENU,
2396 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2397 PREV_MENU,
2398 NEXT_MENU,
2399 PREVPAGE_MENU,
2400 NEXTPAGE_MENU,
2401 HOMEKEY_MENU,
2402 ENDKEY_MENU,
2403 PRYNTTXT_MENU,
2404 WHEREIS_MENU};
2405 INST_KEY_MENU(config_radiobutton_keymenu, config_radiobutton_keys);
2408 struct key config_yesno_keys[] =
2409 {HELP_MENU,
2410 NULL_MENU,
2411 EXIT_SETUP_MENU,
2412 {"C", "[" N_("Change") "]", {MC_TOGGLE,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2413 PREV_MENU,
2414 NEXT_MENU,
2415 PREVPAGE_MENU,
2416 NEXTPAGE_MENU,
2417 HOMEKEY_MENU,
2418 ENDKEY_MENU,
2419 PRYNTTXT_MENU,
2420 WHEREIS_MENU};
2421 INST_KEY_MENU(config_yesno_keymenu, config_yesno_keys);
2424 struct key color_changing_keys[] =
2425 {HELP_MENU,
2426 NULL_MENU,
2427 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2428 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2429 PREV_MENU,
2430 NEXT_MENU,
2431 PREVPAGE_MENU,
2432 NEXTPAGE_MENU,
2433 HOMEKEY_MENU,
2434 ENDKEY_MENU,
2435 PRYNTTXT_MENU,
2436 WHEREIS_MENU};
2437 INST_KEY_MENU(color_changing_keymenu, color_changing_keys);
2440 struct key custom_color_changing_keys[] =
2441 {HELP_MENU,
2442 NULL_MENU,
2443 /* TRANSLATORS: go to color configuration screen */
2444 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2445 {"*", "[" N_("Select") "]", {MC_CHOICEB,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2446 PREV_MENU,
2447 NEXT_MENU,
2448 PREVPAGE_MENU,
2449 NEXTPAGE_MENU,
2450 HOMEKEY_MENU,
2451 ENDKEY_MENU,
2452 PRYNTTXT_MENU,
2453 WHEREIS_MENU};
2454 INST_KEY_MENU(custom_color_changing_keymenu, custom_color_changing_keys);
2457 struct key kw_color_changing_keys[] =
2458 {HELP_MENU,
2459 NULL_MENU,
2460 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2461 {"*", "[" N_("Select") "]", {MC_CHOICEC,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2462 PREV_MENU,
2463 NEXT_MENU,
2464 PREVPAGE_MENU,
2465 NEXTPAGE_MENU,
2466 HOMEKEY_MENU,
2467 ENDKEY_MENU,
2468 PRYNTTXT_MENU,
2469 WHEREIS_MENU};
2470 INST_KEY_MENU(kw_color_changing_keymenu, kw_color_changing_keys);
2473 #ifdef _WINDOWS
2475 struct key color_rgb_changing_keys[] =
2476 {HELP_MENU,
2477 OTHER_MENU,
2478 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2479 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2480 PREV_MENU,
2481 NEXT_MENU,
2482 PREVPAGE_MENU,
2483 NEXTPAGE_MENU,
2484 {"C", N_("Customize"), {MC_RGB1,1,{'c'}},KS_NONE},
2485 NULL_MENU,
2486 PRYNTTXT_MENU,
2487 WHEREIS_MENU,
2489 HELP_MENU,
2490 OTHER_MENU,
2491 NULL_MENU,
2492 NULL_MENU,
2493 NULL_MENU,
2494 NULL_MENU,
2495 NULL_MENU,
2496 NULL_MENU,
2497 NULL_MENU,
2498 NULL_MENU,
2499 HOMEKEY_MENU,
2500 ENDKEY_MENU};
2501 INST_KEY_MENU(color_rgb_keymenu, color_rgb_changing_keys);
2504 struct key custom_rgb_changing_keys[] =
2505 {HELP_MENU,
2506 OTHER_MENU,
2507 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2508 {"*", "[" N_("Select") "]", {MC_CHOICEB,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2509 PREV_MENU,
2510 NEXT_MENU,
2511 PREVPAGE_MENU,
2512 NEXTPAGE_MENU,
2513 {"C", N_("Customize"), {MC_RGB2,1,{'c'}},KS_NONE},
2514 NULL_MENU,
2515 PRYNTTXT_MENU,
2516 WHEREIS_MENU,
2518 HELP_MENU,
2519 OTHER_MENU,
2520 NULL_MENU,
2521 NULL_MENU,
2522 NULL_MENU,
2523 NULL_MENU,
2524 NULL_MENU,
2525 NULL_MENU,
2526 NULL_MENU,
2527 NULL_MENU,
2528 HOMEKEY_MENU,
2529 ENDKEY_MENU};
2530 INST_KEY_MENU(custom_rgb_keymenu, custom_rgb_changing_keys);
2533 struct key kw_rgb_changing_keys[] =
2534 {HELP_MENU,
2535 OTHER_MENU,
2536 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2537 {"*", "[" N_("Select") "]", {MC_CHOICEC,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2538 PREV_MENU,
2539 NEXT_MENU,
2540 PREVPAGE_MENU,
2541 NEXTPAGE_MENU,
2542 {"C", N_("Customize"), {MC_RGB3,1,{'c'}},KS_NONE},
2543 NULL_MENU,
2544 PRYNTTXT_MENU,
2545 WHEREIS_MENU,
2547 HELP_MENU,
2548 OTHER_MENU,
2549 NULL_MENU,
2550 NULL_MENU,
2551 NULL_MENU,
2552 NULL_MENU,
2553 NULL_MENU,
2554 NULL_MENU,
2555 NULL_MENU,
2556 NULL_MENU,
2557 HOMEKEY_MENU,
2558 ENDKEY_MENU};
2559 INST_KEY_MENU(kw_rgb_keymenu, kw_rgb_changing_keys);
2561 #endif
2564 struct key color_setting_keys[] =
2565 {HELP_MENU,
2566 OTHER_MENU,
2567 EXIT_SETUP_MENU,
2568 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2569 PREV_MENU,
2570 NEXT_MENU,
2571 PREVPAGE_MENU,
2572 NEXTPAGE_MENU,
2573 {"A", N_("AddHeader"), {MC_ADD,1,{'a'}}, KS_NONE},
2574 /* TRANSLATORS: restore defaults */
2575 {"R", N_("RestoreDefs"), {MC_DEFAULT,1,{'r'}}, KS_NONE},
2576 PRYNTTXT_MENU,
2577 WHEREIS_MENU,
2579 HELP_MENU,
2580 OTHER_MENU,
2581 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
2582 NULL_MENU,
2583 NULL_MENU,
2584 NULL_MENU,
2585 NULL_MENU,
2586 NULL_MENU,
2587 NULL_MENU,
2588 NULL_MENU,
2589 HOMEKEY_MENU,
2590 ENDKEY_MENU};
2591 INST_KEY_MENU(color_setting_keymenu, color_setting_keys);
2594 struct key custom_color_setting_keys[] =
2595 {HELP_MENU,
2596 OTHER_MENU,
2597 EXIT_SETUP_MENU,
2598 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2599 PREV_MENU,
2600 NEXT_MENU,
2601 PREVPAGE_MENU,
2602 NEXTPAGE_MENU,
2603 {"A", N_("AddHeader"), {MC_ADD,1,{'a'}}, KS_NONE},
2604 {"R", N_("RestoreDefs"), {MC_DEFAULT,1,{'r'}}, KS_NONE},
2605 PRYNTTXT_MENU,
2606 WHEREIS_MENU,
2608 HELP_MENU,
2609 OTHER_MENU,
2610 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
2611 NULL_MENU,
2612 {"D", N_("DeleteHdr"), {MC_DELETE,1,{'d'}}, KS_NONE},
2613 /* TRANSLATORS: shuffle headers (change the order of headers) */
2614 {"$", N_("ShuffleHdr"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
2615 NULL_MENU,
2616 NULL_MENU,
2617 NULL_MENU,
2618 NULL_MENU,
2619 HOMEKEY_MENU,
2620 ENDKEY_MENU};
2621 INST_KEY_MENU(custom_color_setting_keymenu, custom_color_setting_keys);
2624 struct key role_color_setting_keys[] =
2625 {HELP_MENU,
2626 NULL_MENU,
2627 EXIT_SETUP_MENU,
2628 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2629 PREV_MENU,
2630 NEXT_MENU,
2631 PREVPAGE_MENU,
2632 NEXTPAGE_MENU,
2633 HOMEKEY_MENU,
2634 ENDKEY_MENU,
2635 PRYNTTXT_MENU,
2636 WHEREIS_MENU};
2637 INST_KEY_MENU(role_color_setting_keymenu, role_color_setting_keys);
2640 struct key kw_color_setting_keys[] =
2641 {HELP_MENU,
2642 OTHER_MENU,
2643 EXIT_SETUP_MENU,
2644 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2645 PREV_MENU,
2646 NEXT_MENU,
2647 PREVPAGE_MENU,
2648 NEXTPAGE_MENU,
2649 {"A", N_("AddHeader"), {MC_ADD,1,{'a'}}, KS_NONE},
2650 {"R", N_("RestoreDefs"), {MC_DEFAULT,1,{'r'}}, KS_NONE},
2651 PRYNTTXT_MENU,
2652 WHEREIS_MENU,
2654 HELP_MENU,
2655 OTHER_MENU,
2656 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
2657 NULL_MENU,
2658 NULL_MENU,
2659 NULL_MENU,
2660 NULL_MENU,
2661 NULL_MENU,
2662 NULL_MENU,
2663 NULL_MENU,
2664 HOMEKEY_MENU,
2665 ENDKEY_MENU};
2666 INST_KEY_MENU(kw_color_setting_keymenu, kw_color_setting_keys);
2669 struct key take_export_keys_sm[] =
2670 {HELP_MENU,
2671 WHEREIS_MENU,
2672 /* TRANSLATORS: exit the Take Address screen */
2673 {"<",N_("ExitTake"), {MC_EXIT,4,{'e',ctrl('C'),'<',','}}, KS_EXITMODE},
2674 {"T","[" N_("Take") "]",{MC_TAKE,3,{'t',ctrl('M'),ctrl('J')}}, KS_NONE},
2675 PREV_MENU,
2676 NEXT_MENU,
2677 PREVPAGE_MENU,
2678 NEXTPAGE_MENU,
2679 NULL_MENU,
2680 NULL_MENU,
2681 NULL_MENU,
2682 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE}};
2683 INST_KEY_MENU(take_export_keymenu_sm, take_export_keys_sm);
2686 struct key take_export_keys_lm[] =
2687 {HELP_MENU,
2688 WHEREIS_MENU,
2689 {"<",N_("ExitTake"), {MC_EXIT,4,{'e',ctrl('C'),'<',','}}, KS_EXITMODE},
2690 {"T",N_("Take"), {MC_TAKE,1,{'t'}}, KS_NONE},
2691 PREV_MENU,
2692 NEXT_MENU,
2693 PREVPAGE_MENU,
2694 NEXTPAGE_MENU,
2695 {"X","[" N_("Set/Unset") "]", {MC_CHOICE,3,{'x',ctrl('M'),ctrl('J')}}, KS_NONE},
2696 {"A", N_("SetAll"),{MC_SELALL,1,{'a'}},KS_NONE},
2697 {"U",N_("UnSetAll"),{MC_UNSELALL,1,{'u'}},KS_NONE},
2698 {"S",N_("SinglMode"),{MC_LISTMODE,1,{'s'}},KS_NONE}};
2699 INST_KEY_MENU(take_export_keymenu_lm, take_export_keys_lm);
2702 struct key smime_info_keys[] =
2703 {HELP_MENU,
2704 OTHER_MENU,
2705 {"<","Back",{MC_VIEW_TEXT,2,{'<',','}},KS_EXITMODE},
2706 NULL_MENU,
2707 NULL_MENU,
2708 NULL_MENU,
2709 PREVPAGE_MENU,
2710 NEXTPAGE_MENU,
2711 NULL_MENU,
2712 NULL_MENU,
2713 NULL_MENU,
2714 NULL_MENU,
2716 HELP_MENU,
2717 OTHER_MENU,
2718 MAIN_MENU,
2719 QUIT_MENU,
2720 NULL_MENU,
2721 NULL_MENU,
2722 NULL_MENU,
2723 NULL_MENU,
2724 NULL_MENU,
2725 INDEX_MENU,
2726 NULL_MENU,
2727 NULL_MENU};
2728 INST_KEY_MENU(smime_info_keymenu, smime_info_keys);
2731 struct key config_smime_helper_keys[] =
2732 {HELP_MENU,
2733 WHEREIS_MENU,
2734 EXIT_SETUP_MENU,
2735 {"T","[" N_("Transfer") "]", {MC_CHOICE,3,{'t',ctrl('M'),ctrl('J')}}, KS_NONE},
2736 PREV_MENU,
2737 NEXT_MENU,
2738 PREVPAGE_MENU,
2739 NEXTPAGE_MENU,
2740 NULL_MENU,
2741 NULL_MENU,
2742 HOMEKEY_MENU,
2743 ENDKEY_MENU};
2744 INST_KEY_MENU(config_smime_helper_keymenu, config_smime_helper_keys);
2746 struct key config_smime_manage_certs_menu_keys[] =
2747 {HELP_MENU,
2748 WHEREIS_MENU,
2749 EXIT_SETUP_MENU,
2750 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
2751 {"I", N_("Import Cert"), {MC_IMPORT,1,{'i'}}, KS_NONE},
2752 NULL_MENU,
2753 PREV_MENU,
2754 NEXT_MENU,
2755 PREVPAGE_MENU,
2756 NEXTPAGE_MENU,
2757 HOMEKEY_MENU,
2758 ENDKEY_MENU};
2759 INST_KEY_MENU(config_smime_manage_certs_menu_keymenu, config_smime_manage_certs_menu_keys);
2761 struct key config_smime_add_certs_keys[] =
2762 {HELP_MENU,
2763 NULL_MENU,
2764 EXIT_SETUP_MENU,
2765 {"I", N_("Import Cert"), {MC_IMPORT,3,{'i', ctrl('M'), ctrl('J')}}, KS_NONE},
2766 NULL_MENU,
2767 NULL_MENU,
2768 NULL_MENU,
2769 NULL_MENU,
2770 NULL_MENU,
2771 NULL_MENU,
2772 NULL_MENU,
2773 NULL_MENU};
2774 INST_KEY_MENU(config_smime_add_certs_keymenu, config_smime_add_certs_keys);
2776 struct key config_smime_add_new_key[] =
2777 {HELP_MENU,
2778 NULL_MENU,
2779 EXIT_SETUP_MENU,
2780 {"I", N_("Import Key"), {MC_IMPORT,3,{'i', ctrl('M'), ctrl('J')}}, KS_NONE},
2781 {"C", N_("Create Key"), {MC_ADD,1,{'c'}}, KS_NONE},
2782 NULL_MENU,
2783 NULL_MENU,
2784 NULL_MENU,
2785 NULL_MENU,
2786 NULL_MENU,
2787 NULL_MENU,
2788 NULL_MENU};
2789 INST_KEY_MENU(config_smime_add_new_key_keymenu, config_smime_add_new_key);
2791 struct key config_smime_manage_certs_work_keys[] =
2792 {HELP_MENU,
2793 OTHER_MENU,
2794 EXIT_SETUP_MENU,
2795 {"V", "[" N_("View Info") "]", {MC_CHOICE,3,{'v',ctrl('M'),ctrl('J')}}, KS_NONE},
2796 {"I", N_("Import Cert"), {MC_IMPORT,1,{'i'}}, KS_NONE},
2797 NULL_MENU,
2798 {"D", N_("Delete"), {MC_DELETE,1,{'d'}}, KS_NONE},
2799 {"U", N_("Undelete"), {MC_UNDELETE,1,{'u'}}, KS_NONE},
2800 {"X", N_("Expunge"), {MC_EXPUNGE,1,{'x'}}, KS_NONE},
2801 NULL_MENU,
2802 NULL_MENU,
2803 WHEREIS_MENU,
2805 PREV_MENU,
2806 NEXT_MENU,
2807 PREVPAGE_MENU,
2808 NEXTPAGE_MENU,
2809 NULL_MENU,
2810 NULL_MENU,
2811 NULL_MENU,
2812 NULL_MENU,
2813 NULL_MENU,
2814 NULL_MENU,
2815 HOMEKEY_MENU,
2816 ENDKEY_MENU};
2817 INST_KEY_MENU(config_smime_manage_certs_work_keymenu, config_smime_manage_certs_work_keys);
2819 struct key config_smime_view_cert[] =
2820 {HELP_MENU,
2821 NULL_MENU,
2822 EXIT_SETUP_MENU,
2823 {"V", "[" N_("View Info") "]", {MC_CHOICE,3,{'v',ctrl('M'),ctrl('J')}}, KS_NONE},
2824 {"D", N_("Delete pwd"), {MC_DELETE,1,{'d'}},KS_NONE},
2825 NULL_MENU,
2826 NULL_MENU,
2827 NULL_MENU,
2828 NULL_MENU,
2829 NULL_MENU,
2830 NULL_MENU,
2831 NULL_MENU};
2832 INST_KEY_MENU(config_smime_manage_view_cert_keymenu, config_smime_view_cert);
2834 struct key config_smime_view_cert_no_delete[] =
2835 {HELP_MENU,
2836 NULL_MENU,
2837 EXIT_SETUP_MENU,
2838 {"V", "[" N_("View Info") "]", {MC_CHOICE,3,{'v',ctrl('M'),ctrl('J')}}, KS_NONE},
2839 NULL_MENU,
2840 NULL_MENU,
2841 NULL_MENU,
2842 NULL_MENU,
2843 NULL_MENU,
2844 NULL_MENU,
2845 NULL_MENU,
2846 NULL_MENU};
2847 INST_KEY_MENU(config_smime_manage_view_cert_keymenu_no_delete, config_smime_view_cert_no_delete);
2849 struct key smime_certificate_info_keys[] =
2850 {HELP_MENU,
2851 OTHER_MENU,
2852 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
2853 {"T",N_("Trust Cert"), {MC_TRUST,1,{'t'}},KS_NONE},
2854 {"D",N_("Delete"), {MC_DELETE,1,{'d'}},KS_NONE},
2855 {"U",N_("Undelete"), {MC_UNDELETE,1,{'u'}},KS_NONE},
2856 {"B",N_("Public Key"), {MC_PUBLIC,1,{'b'}},KS_NONE},
2857 {"R",N_("Private Key"),{MC_PRIVATE,1,{'r'}},KS_NONE},
2858 NULL_MENU,
2859 NULL_MENU,
2860 NULL_MENU,
2861 NULL_MENU,
2863 HELP_MENU,
2864 OTHER_MENU,
2865 PREVPAGE_MENU,
2866 NEXTPAGE_MENU,
2867 PRYNTTXT_MENU,
2868 WHEREIS_MENU,
2869 NULL_MENU,
2870 NULL_MENU,
2871 NULL_MENU,
2872 NULL_MENU,
2873 HOMEKEY_MENU,
2874 ENDKEY_MENU};
2875 INST_KEY_MENU(smime_certificate_info_keymenu, smime_certificate_info_keys);
2878 struct key config_smime_manage_password_file_menu_keys[] =
2879 {HELP_MENU,
2880 WHEREIS_MENU,
2881 EXIT_SETUP_MENU,
2882 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
2883 {"I", N_("Import Cert"), {MC_IMPORT,1,{'i'}}, KS_NONE},
2884 NULL_MENU,
2885 PREV_MENU,
2886 NEXT_MENU,
2887 PREVPAGE_MENU,
2888 NEXTPAGE_MENU,
2889 HOMEKEY_MENU,
2890 ENDKEY_MENU};
2891 INST_KEY_MENU(config_smime_manage_password_file_menu_keymenu, config_smime_manage_password_file_menu_keys);
2896 * Internal prototypes
2898 void output_keymenu(struct key_menu *, unsigned char *, int, int);
2899 void format_keymenu(struct key_menu *, unsigned char *, int);
2900 void menu_clear_cmd_binding(struct key_menu *, int);
2901 #ifdef MOUSE
2902 void print_inverted_label(int, MENUITEM *);
2903 #endif
2906 /* Saved key menu drawing state */
2907 static struct {
2908 struct key_menu *km;
2909 int row,
2910 column,
2911 blanked;
2912 bitmap_t bitmap;
2913 } km_state;
2917 * Longest label that can be displayed in keymenu
2919 #define MAX_LABEL 40
2920 #define MAX_KEYNAME 3
2921 static struct key last_time_buf[12];
2922 static int keymenu_is_dirty = 1;
2924 void
2925 mark_keymenu_dirty(void)
2927 keymenu_is_dirty = 1;
2932 * Write an already formatted key_menu to the screen
2934 * Args: km -- key_menu structure
2935 * bm -- bitmap, 0's mean don't draw this key
2936 * row -- the row on the screen to begin on, negative values
2937 * are counted from the bottom of the screen up
2938 * column -- column on the screen to begin on
2940 * The bits in the bitmap are used from least significant to most significant,
2941 * not left to right. So, if you write out the bitmap in the normal way, for
2942 * example,
2943 * bm[0] = 0x5, bm[1] = 0x8, bm[2] = 0x21, bm[3] = bm[4] = bm[5] = 0
2944 * 0000 0101 0000 1000 0010 0001 ...
2945 * means that menu item 0 (first row, first column) is set, item 1 (2nd row,
2946 * first column) is not set, item 2 is set, items 3-10 are not set, item 11
2947 * (2nd row, 6th and last column) is set. In the second menu (the second set
2948 * of 12 bits) items 0-3 are unset, 4 is set, 5-8 unset, 9 set, 10-11 unset.
2949 * That uses up bm[0] - bm[2].
2950 * Just to make sure, here it is drawn out for the first set of 12 items in
2951 * the first keymenu (0-11)
2952 * bm[0] x x x x x x x x bm[1] x x x x x x x x
2953 * 7 6 5 4 3 2 1 0 1110 9 8
2955 void
2956 output_keymenu(struct key_menu *km, unsigned char *bm, int row, int column)
2958 #ifdef __CYGWIN__
2959 extern char term_name[];
2960 #endif
2961 register struct key *k;
2962 struct key *last_time;
2963 int i, j,
2964 ufk, /* using function keys */
2965 real_row,
2966 max_column, /* number of columns on screen */
2967 off; /* offset into keymap */
2968 struct variable *vars = ps_global->vars;
2969 COLOR_PAIR *lastc=NULL, *label_color=NULL, *name_color=NULL;
2970 #ifdef MOUSE
2971 /* 6's are for UTF-8 */
2972 char keystr[6*MAX_KEYNAME + 6*MAX_LABEL + 2];
2973 #endif
2975 off = km->which * 12;
2976 max_column = ps_global->ttyo->screen_cols;
2978 if((ps_global->ttyo->screen_rows - FOOTER_ROWS(ps_global)) < 0
2979 || max_column <= 0){
2980 keymenu_is_dirty = 1;
2981 return;
2985 real_row = row > 0 ? row : ps_global->ttyo->screen_rows + row;
2987 if(pico_usingcolor()){
2988 lastc = pico_get_cur_color();
2989 if(lastc && VAR_KEYLABEL_FORE_COLOR && VAR_KEYLABEL_BACK_COLOR &&
2990 pico_is_good_color(VAR_KEYLABEL_FORE_COLOR) &&
2991 pico_is_good_color(VAR_KEYLABEL_BACK_COLOR)){
2992 label_color = new_color_pair(VAR_KEYLABEL_FORE_COLOR,
2993 VAR_KEYLABEL_BACK_COLOR);
2994 if(label_color)
2995 (void)pico_set_colorp(label_color, PSC_NONE);
2998 if(label_color && VAR_KEYNAME_FORE_COLOR && VAR_KEYNAME_BACK_COLOR &&
2999 pico_is_good_color(VAR_KEYNAME_FORE_COLOR) &&
3000 pico_is_good_color(VAR_KEYNAME_BACK_COLOR)){
3001 name_color = new_color_pair(VAR_KEYNAME_FORE_COLOR,
3002 VAR_KEYNAME_BACK_COLOR);
3006 if(keymenu_is_dirty){
3007 ClearLines(real_row, real_row+1);
3008 keymenu_is_dirty = 0;
3009 /* first time through, set up storage */
3010 if(!last_time_buf[0].name){
3011 for(i = 0; i < 12; i++){
3012 last_time = &last_time_buf[i];
3013 last_time->name = (char *) fs_get(6*MAX_KEYNAME + 1);
3014 last_time->label = (char *) fs_get(6*MAX_LABEL + 1);
3018 for(i = 0; i < 12; i++)
3019 last_time_buf[i].column = -1;
3022 for(i = 0; i < 12; i++){
3023 int e;
3025 e = off + i;
3026 dprint((9, "%2d %-7.7s %-10.10s %d\n", i,
3027 km == NULL ? "(no km)"
3028 : km->keys[e].name == NULL ? "(null)"
3029 : km->keys[e].name,
3030 km == NULL ? "(no km)"
3031 : km->keys[e].label == NULL ? "(null)"
3032 : km->keys[e].label, km ? km->keys[e].column : 0));
3033 #ifdef MOUSE
3034 register_key(i, NO_OP_COMMAND, "", NULL, 0, 0, 0, NULL, NULL);
3035 #endif
3038 ufk = F_ON(F_USE_FK, ps_global);
3039 dprint((9, "row: %d, real_row: %d, column: %d\n", row,
3040 real_row, column));
3042 for(i = 0; i < 2; i++){
3043 int c, el, empty, fkey, last_in_row, fix_start;
3044 short next_col;
3045 char temp[6*MAX_SCREEN_COLS+1];
3046 char temp2[6*MAX_SCREEN_COLS+1];
3047 char this_label[6*MAX_LABEL+1];
3049 j = 6*i - 1;
3050 #ifndef __CYGWIN__
3051 if(i == 1 && !label_color)
3052 #else
3053 if(i == 1 && (!label_color || !struncmp(term_name,"cygwin", 6)))
3054 #endif
3055 max_column--; /* Some terminals scroll if you write in the
3056 lower right hand corner. If user has a
3057 label_color set we'll take our chances.
3058 Otherwise, we'd get one cell of Normal. */
3061 * k is the key struct we're working on
3062 * c is the column number
3063 * el is an index into the whole keys array
3064 * Last_time_buf is ordered strangely. It goes row by row instead
3065 * of down each column like km does. J is an index into it.
3067 for(c = 0, el = off+i, k = &km->keys[el];
3068 k < &km->keys[off+12] && c < max_column;
3069 k += 2, el += 2){
3071 if(k->column > max_column)
3072 break;
3074 j++;
3075 if(ufk)
3076 fkey = 1 + k - &km->keys[off];
3078 empty = (!bitnset(el,bm) || !(k->name && *k->name));
3079 last_time = &last_time_buf[j];
3080 if(k+2 < &km->keys[off+12]){
3081 last_in_row = 0;
3082 next_col = last_time_buf[j+1].column;
3083 fix_start = (k == &km->keys[off] ||
3084 k == &km->keys[off+1]) ? k->column : 0;
3086 else{
3087 last_in_row = 1;
3088 fix_start = 0;
3092 * Make sure there is a space between this label and
3093 * the next name. That is, we prefer a space to the
3094 * extra character of the label because the space
3095 * separates the commands and looks nicer.
3097 if(k->label){
3098 size_t l;
3099 char tmp_label[6*MAX_LABEL+1];
3101 if(k->label[0] == '[' && k->label[(l=strlen(k->label))-1] == ']' && l > 2){
3103 * Can't write in k->label, which might be a constant array.
3105 strncpy(tmp_label, &k->label[1], MIN(sizeof(tmp_label),l-2));
3106 tmp_label[MIN(sizeof(tmp_label)-1,l-2)] = '\0';
3108 snprintf(this_label, sizeof(this_label), "[%s]", _(tmp_label));
3110 else
3111 strncpy(this_label, _(k->label), sizeof(this_label));
3113 this_label[sizeof(this_label)-1] = '\0';
3114 if(!last_in_row){
3115 int trunc;
3117 trunc = (k+2)->column - k->column
3118 - ((k->name ? utf8_width(k->name) : 0) + 1);
3120 * trunc columns available for label but we don't want the label
3121 * to go all the way to the edge
3123 if(utf8_width(this_label) >= trunc){
3124 if(trunc > 1){
3125 strncpy(tmp_label, this_label, sizeof(tmp_label));
3126 tmp_label[sizeof(tmp_label)-1] = '\0';
3127 l = utf8_pad_to_width(this_label, tmp_label, sizeof(this_label)-2, trunc-1, 1);
3128 this_label[l++] = SPACE;
3129 this_label[l] = '\0';;
3131 else if(trunc == 1)
3132 this_label[0] = SPACE;
3133 else
3134 this_label[0] = '\0';
3136 this_label[sizeof(this_label)-1] = '\0';
3140 else
3141 this_label[0] = '\0';
3143 if(!(k->column == last_time->column
3144 && (last_in_row || (k+2)->column <= next_col)
3145 && ((empty && !*last_time->label && !*last_time->name)
3146 || (!empty
3147 && this_label && !strcmp(this_label,last_time->label)
3148 && ((k->name && !strcmp(k->name,last_time->name))
3149 || ufk))))){
3150 if(empty){
3151 /* blank out key with spaces */
3152 strncpy(temp, repeat_char(
3153 ((last_in_row || (k+2)->column > max_column)
3154 ? max_column
3155 : (k+2)->column) -
3156 (fix_start
3158 : k->column),
3159 SPACE), sizeof(temp));
3160 temp[sizeof(temp)-1] = '\0';
3161 last_time->column = k->column;
3162 *last_time->name = '\0';
3163 *last_time->label = '\0';
3164 MoveCursor(real_row + i, column + (fix_start ? 0 : k->column));
3165 Write_to_screen(temp);
3166 c = (fix_start ? 0 : k->column) + strlen(temp);
3168 else{
3169 /* make sure extra space before key name is there */
3170 if(fix_start){
3171 strncpy(temp, repeat_char(k->column, SPACE), sizeof(temp));
3172 temp[sizeof(temp)-1] = '\0';
3173 MoveCursor(real_row + i, column + 0);
3174 Write_to_screen(temp);
3177 /* short name of the key */
3178 if(ufk)
3179 snprintf(temp, sizeof(temp), "F%d", fkey);
3180 else
3181 strncpy(temp, k->name, sizeof(temp));
3183 temp[sizeof(temp)-1] = '\0';
3184 last_time->column = k->column;
3185 strncpy(last_time->name, temp, 6*MAX_KEYNAME);
3186 last_time->name[6*MAX_KEYNAME] = '\0';
3187 /* make sure name not too long */
3188 #ifdef MOUSE
3189 strncpy(keystr, temp, sizeof(keystr));
3190 keystr[sizeof(keystr)-1] = '\0';
3191 #endif
3192 MoveCursor(real_row + i, column + k->column);
3193 if(!empty){
3194 if(name_color)
3195 (void)pico_set_colorp(name_color, PSC_NONE);
3196 else
3197 StartInverse();
3200 Write_to_screen(temp);
3201 c = k->column + utf8_width(temp);
3202 if(!empty){
3203 if(!name_color)
3204 EndInverse();
3207 /* now the space after the name and the label */
3208 temp[0] = '\0';
3209 if(c < max_column){
3210 temp[0] = SPACE;
3211 temp[1] = '\0';
3212 strncat(temp, this_label, sizeof(temp)-strlen(temp)-1);
3214 /* Don't run over the right hand edge */
3215 if(utf8_width(temp) > max_column - c){
3216 size_t l;
3218 l = utf8_pad_to_width(temp2, temp, sizeof(temp2)-1, max_column-c, 1);
3219 temp2[l] = '\0';
3220 strncpy(temp, temp2, sizeof(temp));
3221 temp[sizeof(temp)-1] = '\0';
3224 c += utf8_width(temp);
3227 #ifdef MOUSE
3228 strncat(keystr, temp, sizeof(keystr)-strlen(keystr)-1);
3229 keystr[sizeof(keystr)-1] = '\0';
3230 #endif
3231 /* fill out rest of this key with spaces */
3232 if(c < max_column){
3233 if(last_in_row){
3234 strncat(temp, repeat_char(max_column - c, SPACE), sizeof(temp)-strlen(temp)-1);
3235 c = max_column;
3237 else{
3238 if(c < (k+2)->column){
3239 strncat(temp,
3240 repeat_char((k+2)->column - c, SPACE), sizeof(temp)-strlen(temp)-1);
3241 c = (k+2)->column;
3245 temp[sizeof(temp)-1] = '\0';
3248 strncpy(last_time->label, this_label, 6*MAX_LABEL);
3249 last_time->label[6*MAX_LABEL] = '\0';
3250 if(label_color)
3251 (void)pico_set_colorp(label_color, PSC_NONE);
3253 Write_to_screen(temp);
3256 #ifdef MOUSE
3257 else if(!empty)
3258 /* fill in what register_key needs from cached data */
3259 snprintf(keystr, sizeof(keystr), "%s %s", last_time->name, last_time->label);
3261 if(!empty){
3262 int len;
3265 * If label ends in space,
3266 * don't register the space part of label.
3268 len = strlen(keystr);
3269 while(keystr[len-1] == SPACE)
3270 len--;
3271 len--;
3273 register_key(j, ufk ? PF1 + fkey - 1
3274 : (k->name[0] == '^')
3275 ? ctrl(k->name[1])
3276 : (!strucmp(k->name, "ret"))
3277 ? ctrl('M')
3278 : (!strucmp(k->name, "tab"))
3279 ? '\t'
3280 : (!strucmp(k->name, "spc"))
3281 ? SPACE
3282 : (!strucmp(k->name, HISTORY_UP_KEYNAME))
3283 ? KEY_UP
3284 : (!strucmp(k->name, HISTORY_DOWN_KEYNAME))
3285 ? KEY_DOWN
3286 : (k->bind.nch)
3287 ? ((isascii((int) k->bind.ch[0]) && islower((int) k->bind.ch[0]))
3288 ? toupper((unsigned char) k->bind.ch[0])
3289 : k->bind.ch[0])
3290 : k->name[0],
3291 keystr, print_inverted_label,
3292 real_row+i, k->column, len,
3293 name_color, label_color);
3295 #endif
3299 while(++j < 6*(i+1))
3300 last_time_buf[j].column = -1;
3303 fflush(stdout);
3304 if(lastc){
3305 (void)pico_set_colorp(lastc, PSC_NONE);
3306 free_color_pair(&lastc);
3307 if(label_color)
3308 free_color_pair(&label_color);
3309 if(name_color)
3310 free_color_pair(&name_color);
3316 * Clear the key menu lines.
3318 void
3319 blank_keymenu(int row, int column)
3321 struct variable *vars = ps_global->vars;
3322 COLOR_PAIR *lastc;
3324 if(FOOTER_ROWS(ps_global) > 1){
3325 km_state.blanked = 1;
3326 km_state.row = row;
3327 km_state.column = column;
3328 MoveCursor(row, column);
3329 lastc = pico_set_colors(VAR_KEYLABEL_FORE_COLOR,
3330 VAR_KEYLABEL_BACK_COLOR, PSC_NORM|PSC_RET);
3332 CleartoEOLN();
3333 MoveCursor(row+1, column);
3334 CleartoEOLN();
3335 fflush(stdout);
3336 if(lastc){
3337 (void)pico_set_colorp(lastc, PSC_NONE);
3338 free_color_pair(&lastc);
3344 void
3345 draw_cancel_keymenu(void)
3347 bitmap_t bitmap;
3349 setbitmap(bitmap);
3350 draw_keymenu(&cancel_keymenu, bitmap, ps_global->ttyo->screen_cols,
3351 1-FOOTER_ROWS(ps_global), 0, FirstMenu);
3355 void
3356 clearfooter(struct pine *ps)
3358 ClearLines(ps->ttyo->screen_rows - 3, ps->ttyo->screen_rows - 1);
3359 mark_keymenu_dirty();
3360 mark_status_unknown();
3365 * Calculate formatting for key menu at bottom of screen
3367 * Args: km -- The key_menu structure to format
3368 * bm -- Bitmap indicating which menu items should be displayed. If
3369 * an item is NULL, that also means it shouldn't be displayed.
3370 * Sometimes the bitmap will be turned on in that case and just
3371 * rely on the NULL entry.
3372 * width -- the screen width to format it at
3374 * If already formatted for this particular screen width and the requested
3375 * bitmap and formatted bitmap agree, return.
3377 * The formatting results in the column field in the key_menu being
3378 * filled in. The column field is the column to start the label at, the
3379 * name of the key; after that is the label for the key. The basic idea
3380 * is to line up the end of the names and beginning of the labels. If
3381 * the name is too long and shifting it left would run into previous
3382 * label, then shift the whole menu right, or at least that entry if
3383 * things following are short enough to fit back into the regular
3384 * spacing. This has to be calculated and not fixed so it can cope with
3385 * screen resize.
3387 void
3388 format_keymenu(struct key_menu *km, unsigned char *bm, int width)
3390 int spacing[7], w[6], min_w[6], tw[6], extra[6], ufk, i, set;
3392 /* already formatted? */
3393 if(!km || (width == km->width &&
3394 km->how_many <= km->formatted_hm &&
3395 !memcmp(km->bitmap, bm, BM_SIZE)))
3396 return;
3399 * If we're in the initial command sequence we may be using function
3400 * keys instead of alphas, or vice versa, so we want to recalculate
3401 * the formatting next time through.
3403 if((F_ON(F_USE_FK,ps_global) && ps_global->orig_use_fkeys) ||
3404 (F_OFF(F_USE_FK,ps_global) && !ps_global->orig_use_fkeys)){
3405 km->width = width;
3406 km->formatted_hm = km->how_many;
3407 memcpy(km->bitmap, bm, BM_SIZE);
3410 ufk = F_ON(F_USE_FK,ps_global); /* ufk = "Using Function Keys" */
3412 /* set up "ideal" columns to start in, plus fake 7th column start */
3413 for(i = 0; i < 7; i++)
3414 spacing[i] = (i * width) / 6;
3416 /* Loop thru each set of 12 menus */
3417 for(set = 0; set < km->how_many; set++){
3418 int k_top, k_bot, top_name_width, bot_name_width,
3419 top_label_width, bot_label_width, done, offset, next_one;
3420 struct key *keytop, *keybot;
3422 offset = set * 12; /* offset into keymenu */
3425 * Find the required widths for each box.
3427 for(i = 0; i < 6; i++){
3428 k_top = offset + i*2;
3429 k_bot = k_top + 1;
3430 keytop = &km->keys[k_top];
3431 keybot = &km->keys[k_bot];
3434 * The width of a box is the max width of top or bottom name,
3435 * plus 1 space, plus the max width of top or bottom label.
3437 * ? HelpInfo
3438 * ^C Cancel
3439 * ||||||||||| = 2 + 1 + 8 = 11
3441 * Then we adjust that by adding one space after the box to
3442 * separate it from the next box. The last box doesn't need that
3443 * but we may need an extra space for last box to avoid putting
3444 * a character in the lower right hand cell of display.
3445 * We also have a minimum label width (if screen is really narrow)
3446 * of 3, so at least "Hel" and "Can" shows and the rest gets
3447 * truncated off right hand side.
3450 top_name_width = (keytop->name && bitnset(k_top,bm))
3451 ? (ufk ? (i >= 5 ? 3 : 2)
3452 : utf8_width(keytop->name)) : 0;
3453 bot_name_width = (keybot->name && bitnset(k_bot,bm))
3454 ? (ufk ? (i >= 4 ? 3 : 2)
3455 : utf8_width(keybot->name)) : 0;
3457 * Labels are complicated by the fact that we want to look
3458 * up their translation, but also by the fact that we surround
3459 * the word with brackets like [ViewMsg] when the command is
3460 * the default. We want to look up the translation of the
3461 * part inside the brackets, not the whole thing.
3463 if(keytop->label && bitnset(k_top,bm)){
3464 char tmp_label[6*MAX_LABEL+1];
3465 size_t l;
3467 if(keytop->label[0] == '[' && keytop->label[(l=strlen(keytop->label))-1] == ']' && l > 2){
3469 * Can't write in k->label, which might be a constant array.
3471 strncpy(tmp_label, &keytop->label[1], MIN(sizeof(tmp_label),l-2));
3472 tmp_label[MIN(sizeof(tmp_label)-1,l-2)] = '\0';
3474 top_label_width = 2 + utf8_width(_(tmp_label));
3476 else
3477 top_label_width = utf8_width(_(keytop->label));
3479 else
3480 top_label_width = 0;
3482 if(keybot->label && bitnset(k_bot,bm)){
3483 char tmp_label[6*MAX_LABEL+1];
3484 size_t l;
3486 if(keybot->label[0] == '[' && keybot->label[(l=strlen(keybot->label))-1] == ']' && l > 2){
3487 strncpy(tmp_label, &keybot->label[1], MIN(sizeof(tmp_label),l-2));
3488 tmp_label[MIN(sizeof(tmp_label)-1,l-2)] = '\0';
3490 bot_label_width = 2 + utf8_width(_(tmp_label));
3492 else
3493 bot_label_width = utf8_width(_(keybot->label));
3495 else
3496 bot_label_width = 0;
3499 * The 1 for i < 5 is the space between adjacent boxes.
3500 * The last 1 or 0 when i == 5 is so that we won't try to put
3501 * a character in the lower right cell of the display, since that
3502 * causes a linefeed on some terminals.
3504 w[i] = MAX(top_name_width, bot_name_width) + 1 +
3505 MAX(top_label_width, bot_label_width) +
3506 ((i < 5) ? 1
3507 : ((bot_label_width >= top_label_width) ? 1 : 0));
3510 * The smallest we'll squeeze a column.
3512 * X ABCDEF we'll squeeze to X ABC
3513 * YZ GHIJ YZ GHI
3515 min_w[i] = MAX(top_name_width, bot_name_width) + 1 +
3516 MIN(MAX(top_label_width, bot_label_width), 3) +
3517 ((i < 5) ? 1
3518 : ((bot_label_width >= top_label_width) ? 1 : 0));
3520 /* init trial width */
3521 tw[i] = spacing[i+1] - spacing[i];
3522 extra[i] = tw[i] - w[i]; /* negative if it doesn't fit */
3526 * See if we can fit everything on the screen.
3528 done = 0;
3529 while(!done){
3530 int smallest_extra, how_small;
3532 /* Find smallest extra */
3533 smallest_extra = -1;
3534 how_small = 100;
3535 for(i = 0; i < 6; i++){
3536 if(extra[i] < how_small){
3537 smallest_extra = i;
3538 how_small = extra[i];
3542 if(how_small >= 0) /* everything fits */
3543 done++;
3544 else{
3545 int take_from, how_close;
3548 * Find the one that is closest to the ideal width
3549 * that has some extra to spare.
3551 take_from = -1;
3552 how_close = 100;
3553 for(i = 0; i < 6; i++){
3554 if(extra[i] > 0 &&
3555 ((spacing[i+1]-spacing[i]) - tw[i]) < how_close){
3556 take_from = i;
3557 how_close = (spacing[i+1]-spacing[i]) - tw[i];
3561 if(take_from >= 0){
3563 * Found one. Take one from take_from and add it
3564 * to the smallest_extra.
3566 tw[smallest_extra]++;
3567 extra[smallest_extra]++;
3568 tw[take_from]--;
3569 extra[take_from]--;
3571 else{
3572 int used_width;
3575 * Oops. Not enough space to fit everything in.
3576 * Some of the labels are truncated. Some may even be
3577 * truncated past the minimum. We make sure that each
3578 * field is at least its minimum size, and then we cut
3579 * back those over the minimum until we can fit all the
3580 * minimal names on the screen (if possible).
3582 for(i = 0; i < 6; i++)
3583 tw[i] = MAX(tw[i], min_w[i]);
3585 used_width = 0;
3586 for(i = 0; i < 6; i++)
3587 used_width += tw[i];
3589 while(used_width > width && !done){
3590 int candidate, excess;
3593 * Find the one with the most width over it's
3594 * minimum width.
3596 candidate = -1;
3597 excess = -100;
3598 for(i = 0; i < 6; i++){
3599 if(tw[i] - min_w[i] > excess){
3600 candidate = i;
3601 excess = tw[i] - min_w[i];
3605 if(excess > 0){
3606 tw[candidate]--;
3607 used_width--;
3609 else
3610 done++;
3613 done++;
3619 * Assign the format we came up with to the keymenu.
3621 next_one = 0;
3622 for(i = 0; i < 6; i++){
3623 k_top = offset + i*2;
3624 k_bot = k_top + 1;
3625 keytop = &km->keys[k_top];
3626 keybot = &km->keys[k_bot];
3627 top_name_width = (keytop->name && bitnset(k_top,bm))
3628 ? (ufk ? (i >= 5 ? 3 : 2)
3629 : utf8_width(keytop->name)) : 0;
3630 bot_name_width = (keybot->name && bitnset(k_bot,bm))
3631 ? (ufk ? (i >= 4 ? 3 : 2)
3632 : utf8_width(keybot->name)) : 0;
3634 if(top_name_width >= bot_name_width){
3635 keytop->column = next_one;
3636 keybot->column = next_one + (top_name_width - bot_name_width);
3638 else{
3639 keytop->column = next_one + (bot_name_width - top_name_width);
3640 keybot->column = next_one;
3643 next_one += tw[i];
3650 * Draw the key menu at bottom of screen
3652 * Args: km -- key_menu structure
3653 * bitmap -- which fields are active
3654 * width -- the screen width to format it at
3655 * row -- where to put it
3656 * column -- where to put it
3657 * what -- this is an enum telling us whether to display the
3658 * first menu (first set of 12 keys), or to display the same
3659 * one we displayed last time, or to display a particular
3660 * one (which), or to display the next one.
3662 * Fields are inactive if *either* the corresponding bitmap entry is 0 *or*
3663 * the actual entry in the key_menu is NULL. Therefore, it is sometimes
3664 * useful to just turn on all the bits in a bitmap and let the NULLs take
3665 * care of it. On the other hand, the bitmap gives a convenient method
3666 * for turning some keys on or off dynamically or due to options.
3667 * Both methods are used about equally.
3669 * Also saves the state for a possible redraw later.
3671 * Row should usually be a negative number. If row is 0, the menu is not
3672 * drawn.
3674 void
3675 draw_keymenu(struct key_menu *km, unsigned char *bitmap, int width, int row,
3676 int column, OtherMenu what)
3678 #ifdef _WINDOWS
3679 configure_menu_items (km, bitmap);
3680 #endif
3681 format_keymenu(km, bitmap, width);
3683 /*--- save state for a possible redraw ---*/
3684 km_state.km = km;
3685 km_state.row = row;
3686 km_state.column = column;
3687 memcpy(km_state.bitmap, bitmap, BM_SIZE);
3689 if(row == 0)
3690 return;
3692 if(km_state.blanked)
3693 keymenu_is_dirty = 1;
3695 if(what == FirstMenu || what == SecondMenu || what == ThirdMenu ||
3696 what == FourthMenu || what == MenuNotSet){
3697 if(what == FirstMenu || what == MenuNotSet)
3698 km->which = 0;
3699 else if(what == SecondMenu)
3700 km->which = 1;
3701 else if(what == ThirdMenu)
3702 km->which = 2;
3703 else if(what == FourthMenu)
3704 km->which = 3;
3706 if(km->which >= km->how_many)
3707 km->which = 0;
3709 else if(what == NextMenu)
3710 km->which = (km->which + 1) % km->how_many;
3711 /* else what must be SameMenu */
3713 output_keymenu(km, bitmap, row, column);
3715 km_state.blanked = 0;
3719 void
3720 redraw_keymenu(void)
3722 if(km_state.blanked)
3723 blank_keymenu(km_state.row, km_state.column);
3724 else
3725 draw_keymenu(km_state.km, km_state.bitmap, ps_global->ttyo->screen_cols,
3726 km_state.row, km_state.column, SameMenu);
3731 * end_keymenu - free resources associated with keymenu display cache
3733 void
3734 end_keymenu(void)
3736 int i;
3738 for(i = 0; i < 12; i++){
3739 if(last_time_buf[i].name)
3740 fs_give((void **) &last_time_buf[i].name);
3742 if(last_time_buf[i].label)
3743 fs_give((void **) &last_time_buf[i].label);
3748 /*----------------------------------------------------------------------
3749 Reveal Keymenu to Pine Command mappings
3751 Args:
3753 ----*/
3755 menu_command(UCS keystroke, struct key_menu *menu)
3757 int i, n;
3759 if(keystroke == KEY_UTF8 || keystroke == KEY_UNKNOWN)
3760 return(MC_UTF8);
3762 if(!menu)
3763 return(MC_UNKNOWN);
3765 if(F_ON(F_USE_FK,ps_global)){
3766 /* No alpha commands permitted in function key mode */
3767 if(keystroke < 0x80 && isalpha((unsigned char) keystroke))
3768 return(MC_UNKNOWN);
3770 /* Tres simple: compute offset, and test */
3771 if(keystroke >= F1 && keystroke <= F12){
3772 n = (menu->which * 12) + (keystroke - F1);
3773 if(bitnset(n, menu->bitmap))
3774 return(menu->keys[n].bind.cmd);
3777 else if(keystroke >= F1 && keystroke <= F12)
3778 return(MC_UNKNOWN);
3780 /* if ascii, coerce lower case */
3781 if(keystroke < 0x80 && isupper((unsigned char) keystroke))
3782 keystroke = tolower((unsigned char) keystroke);
3784 /* keep this here for Windows port */
3785 if((keystroke = validatekeys(keystroke)) == KEY_JUNK)
3786 return(MC_UNKNOWN);
3788 /* Scan the list for any keystroke/command binding */
3789 if(keystroke != NO_OP_COMMAND)
3790 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3791 if(bitnset(i, menu->bitmap))
3792 for(n = menu->keys[i].bind.nch - 1; n >= 0; n--)
3793 if(keystroke == menu->keys[i].bind.ch[n])
3794 return(menu->keys[i].bind.cmd);
3797 * If explicit mapping failed, check feature mappings and
3798 * hardwired defaults...
3800 if(F_ON(F_ENABLE_PRYNT,ps_global)
3801 && (keystroke == 'y' || keystroke == 'Y')){
3802 /* SPECIAL CASE: Scan the list for print bindings */
3803 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3804 if(bitnset(i, menu->bitmap))
3805 if(menu->keys[i].bind.cmd == MC_PRINTMSG
3806 || menu->keys[i].bind.cmd == MC_PRINTTXT)
3807 return(menu->keys[i].bind.cmd);
3810 if(F_ON(F_ENABLE_LESSTHAN_EXIT,ps_global)
3811 && (keystroke == '<' || keystroke == ','
3812 || (F_ON(F_ARROW_NAV,ps_global) && keystroke == KEY_LEFT))){
3813 /* SPECIAL CASE: Scan the list for MC_EXIT bindings */
3814 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3815 if(bitnset(i, menu->bitmap))
3816 if(menu->keys[i].bind.cmd == MC_EXIT)
3817 return(MC_EXIT);
3821 * If no match after scanning bindings, try universally
3822 * bound keystrokes...
3824 switch(keystroke){
3825 case KEY_MOUSE :
3826 return(MC_MOUSE);
3828 case ctrl('P') :
3829 case KEY_UP :
3830 return(MC_CHARUP);
3832 case ctrl('N') :
3833 case KEY_DOWN :
3834 return(MC_CHARDOWN);
3836 case ctrl('F') :
3837 case KEY_RIGHT :
3838 return(MC_CHARRIGHT);
3840 case ctrl('B') :
3841 case KEY_LEFT :
3842 return(MC_CHARLEFT);
3844 case ctrl('A') :
3845 return(MC_GOTOBOL);
3847 case ctrl('E') :
3848 return(MC_GOTOEOL);
3850 case ctrl('L') :
3851 return(MC_REPAINT);
3853 case KEY_RESIZE :
3854 return(MC_RESIZE);
3856 case NO_OP_IDLE:
3857 case NO_OP_COMMAND:
3858 if(USER_INPUT_TIMEOUT(ps_global))
3859 user_input_timeout_exit(ps_global->hours_to_timeout); /* no return */
3861 return(MC_NONE);
3863 default :
3864 break;
3867 return(MC_UNKNOWN); /* utter failure */
3872 /*----------------------------------------------------------------------
3873 Set up a binding for cmd, with one key bound to it.
3874 Use menu_add_binding to add more keys to this binding.
3876 Args: menu -- the keymenu
3877 key -- the initial key to bind to
3878 cmd -- the command to initialize to
3879 name -- a pointer to the string to point name to
3880 label -- a pointer to the string to point label to
3881 keynum -- which key in the keys array to initialize
3883 For translation purposes, the label in the calling routine
3884 should be wrapped in an N_() macro.
3886 ----*/
3887 void
3888 menu_init_binding(struct key_menu *menu, UCS key, int cmd, char *name, char *label, int keynum)
3890 /* if ascii, coerce to lower case */
3891 if(key < 0x80 && isupper((unsigned char)key))
3892 key = tolower((unsigned char)key);
3894 /* remove binding from any other key */
3895 menu_clear_cmd_binding(menu, cmd);
3897 menu->keys[keynum].name = name;
3898 menu->keys[keynum].label = label;
3899 menu->keys[keynum].bind.cmd = cmd;
3900 menu->keys[keynum].bind.nch = 0;
3901 menu->keys[keynum].bind.ch[menu->keys[keynum].bind.nch++] = key;
3905 /*----------------------------------------------------------------------
3906 Add a key/command binding to the given keymenu structure
3908 Args:
3910 ----*/
3911 void
3912 menu_add_binding(struct key_menu *menu, UCS key, int cmd)
3914 int i, n;
3916 /* NOTE: cmd *MUST* already have had a binding */
3917 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3918 if(menu->keys[i].bind.cmd == cmd){
3919 for(n = menu->keys[i].bind.nch - 1;
3920 n >= 0 && key != menu->keys[i].bind.ch[n];
3921 n--)
3924 /* if ascii, coerce to lower case */
3925 if(key < 0x80 && isupper((unsigned char)key))
3926 key = tolower((unsigned char)key);
3928 if(n < 0) /* not already bound, bind it */
3929 menu->keys[i].bind.ch[menu->keys[i].bind.nch++] = key;
3931 break;
3936 /*----------------------------------------------------------------------
3937 REMOVE a key/command binding from the given keymenu structure
3939 Args:
3941 ----*/
3943 menu_clear_binding(struct key_menu *menu, UCS key)
3945 int i, n;
3947 /* if ascii, coerce to lower case */
3948 if(key < 0x80 && isupper((unsigned char)key))
3949 key = tolower((unsigned char)key);
3951 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3952 for(n = menu->keys[i].bind.nch - 1; n >= 0; n--)
3953 if(key == menu->keys[i].bind.ch[n]){
3954 int cmd = menu->keys[i].bind.cmd;
3956 for(--menu->keys[i].bind.nch; n < menu->keys[i].bind.nch; n++)
3957 menu->keys[i].bind.ch[n] = menu->keys[i].bind.ch[n+1];
3959 return(cmd);
3962 return(MC_UNKNOWN);
3966 void
3967 menu_clear_cmd_binding(struct key_menu *menu, int cmd)
3969 int i;
3971 for(i = (menu->how_many * 12) - 1; i >= 0; i--){
3972 if(cmd == menu->keys[i].bind.cmd){
3973 menu->keys[i].name = NULL;
3974 menu->keys[i].label = NULL;
3975 menu->keys[i].bind.cmd = 0;
3976 menu->keys[i].bind.nch = 0;
3977 menu->keys[i].bind.ch[0] = 0;
3984 menu_binding_index(struct key_menu *menu, int cmd)
3986 int i;
3988 for(i = 0; i < menu->how_many * 12; i++)
3989 if(cmd == menu->keys[i].bind.cmd)
3990 return(i);
3992 return(-1);
3996 #ifdef MOUSE
3998 * print_inverted_label - highlight the label of the given menu item.
3999 * (callback from pico mouse routines)
4001 * So far, this is only
4002 * ever called with the top left row equal to the bottom right row.
4003 * If you change that you probably need to fix it.
4005 void
4006 print_inverted_label(int state, MENUITEM *m)
4008 unsigned i, j, k;
4009 int col_offsetwid, col_offsetchars, do_color = 0, skipwid = 0, skipchars = 0, len, c;
4010 char prename[100];
4011 char namepart[100];
4012 char labelpart[100];
4013 char *lp, *label;
4014 COLOR_PAIR *name_color = NULL, *label_color = NULL, *lastc = NULL;
4015 struct variable *vars = ps_global->vars;
4017 if(m->label && (lp=strchr(m->label, ' '))){
4018 char save;
4020 save = *lp;
4021 *lp = '\0';
4022 col_offsetwid = utf8_width(m->label);
4023 col_offsetchars = lp - m->label;
4024 *lp = save;
4026 else
4027 col_offsetwid = col_offsetchars = 0;
4029 if(pico_usingcolor() && ((VAR_KEYLABEL_FORE_COLOR &&
4030 VAR_KEYLABEL_BACK_COLOR) ||
4031 (VAR_KEYNAME_FORE_COLOR &&
4032 VAR_KEYNAME_BACK_COLOR))){
4033 lastc = pico_get_cur_color();
4035 if(VAR_KEYNAME_FORE_COLOR && VAR_KEYNAME_BACK_COLOR){
4036 name_color = state ? new_color_pair(VAR_KEYNAME_BACK_COLOR,
4037 VAR_KEYNAME_FORE_COLOR)
4038 : new_color_pair(VAR_KEYNAME_FORE_COLOR,
4039 VAR_KEYNAME_BACK_COLOR);
4041 else if(VAR_REV_FORE_COLOR && VAR_REV_BACK_COLOR)
4042 name_color = new_color_pair(VAR_REV_FORE_COLOR, VAR_REV_BACK_COLOR);
4044 if(VAR_KEYLABEL_FORE_COLOR && VAR_KEYLABEL_BACK_COLOR){
4045 label_color = state ? new_color_pair(VAR_KEYLABEL_BACK_COLOR,
4046 VAR_KEYLABEL_FORE_COLOR)
4047 : new_color_pair(VAR_KEYLABEL_FORE_COLOR,
4048 VAR_KEYLABEL_BACK_COLOR);
4050 else if(VAR_REV_FORE_COLOR && VAR_REV_BACK_COLOR){
4051 label_color = state ? new_color_pair(VAR_REV_FORE_COLOR,
4052 VAR_REV_BACK_COLOR)
4053 : new_color_pair(VAR_NORM_FORE_COLOR,
4054 VAR_NORM_BACK_COLOR);
4058 * See if we can grok all these colors. If not, we're going to
4059 * punt and pretend there are no colors at all.
4061 if(!pico_is_good_colorpair(name_color) ||
4062 !pico_is_good_colorpair(label_color)){
4063 if(name_color)
4064 free_color_pair(&name_color);
4065 if(label_color)
4066 free_color_pair(&label_color);
4067 if(lastc)
4068 free_color_pair(&lastc);
4070 else{
4071 do_color++;
4072 (void)pico_set_colorp(label_color, PSC_NONE);
4073 if(!(VAR_KEYLABEL_FORE_COLOR && VAR_KEYLABEL_BACK_COLOR)){
4074 if(state)
4075 StartInverse();
4076 else
4077 EndInverse();
4082 if(!do_color){
4084 * Command name's already inverted, leave it.
4086 skipwid = state ? 0 : col_offsetwid;
4087 skipchars = state ? 0 : col_offsetchars;
4088 if(state)
4089 StartInverse();
4090 else
4091 EndInverse();
4094 MoveCursor((int)(m->tl.r), (int)(m->tl.c) + skipwid);
4096 label = m->label ? m->label : "";
4097 len = strlen(label);
4100 * this is a bit complicated by the fact that we have to keep track of
4101 * the screenwidth as we print the label, because the screenwidth might
4102 * not be the same as the number of characters.
4103 * UNTESTED SINCE switching to UTF-8 *
4105 for(i = m->tl.r; i <= m->br.r; i++){
4106 /* collect part before name */
4107 for(k=0, j = m->tl.c + skipchars; j < MIN(m->lbl.c,m->br.c); j++){
4108 if(k < sizeof(prename))
4109 prename[k++] = ' ';
4112 if(k < sizeof(prename))
4113 prename[k] = '\0';
4115 /* collect name part */
4116 for(k=0; j < MIN(m->lbl.c+col_offsetchars,m->br.c); j++){
4117 c = (i == m->lbl.r &&
4118 j - m->lbl.c < len) ? label[j - m->lbl.c] : ' ';
4119 if(k < sizeof(namepart))
4120 namepart[k++] = c;
4123 if(k < sizeof(namepart))
4124 namepart[k] = '\0';
4126 /* collect label part */
4127 for(k=0; j <= m->br.c; j++){
4128 c = (i == m->lbl.r &&
4129 j - m->lbl.c < len) ? label[j - m->lbl.c] : ' ';
4130 if(k < sizeof(labelpart))
4131 labelpart[k++] = c;
4134 if(k < sizeof(labelpart))
4135 labelpart[k] = '\0';
4138 if(prename)
4139 Write_to_screen(prename);
4141 if(namepart){
4142 if(name_color && col_offsetchars)
4143 (void) pico_set_colorp(name_color, PSC_NONE);
4145 Write_to_screen(namepart);
4148 if(labelpart){
4149 if(name_color && col_offsetchars){
4150 if(label_color)
4151 (void) pico_set_colorp(label_color, PSC_NONE);
4152 else{
4153 if(state)
4154 StartInverse();
4155 else
4156 EndInverse();
4160 Write_to_screen(labelpart);
4163 if(do_color){
4164 if(lastc){
4165 (void)pico_set_colorp(lastc, PSC_NONE);
4166 free_color_pair(&lastc);
4168 else if(state)
4169 EndInverse();
4170 else
4171 pico_set_normal_color();
4173 if(name_color)
4174 free_color_pair(&name_color);
4175 if(label_color)
4176 free_color_pair(&label_color);
4178 else{
4179 if(state)
4180 EndInverse();
4183 #endif /* MOUSE */
4186 #ifdef _WINDOWS
4188 * This function scans the key menu and calls mswin.c functions
4189 * to build a corresponding windows menu.
4191 void
4192 configure_menu_items (struct key_menu *km, bitmap_t bitmap)
4194 int i;
4195 struct key *k;
4196 UCS key;
4198 mswin_menuitemclear ();
4200 if(!km)
4201 return;
4203 for (i = 0, k = km->keys ; i < km->how_many * 12; i++, k++) {
4204 if (k->name != NULL && k->label != NULL && bitnset (i, bitmap) &&
4205 k->menuitem != KS_NONE) {
4207 if (k->name[0] == '^')
4208 key = ctrl(k->name[1]);
4209 else if (strcmp(k->name, "Ret") == 0)
4210 key = '\r';
4211 else if (strcmp(k->name, "Spc") == 0)
4212 key = ' ';
4213 else
4214 key = k->name[0];
4216 mswin_menuitemadd (key, k->label, k->menuitem, 0);
4220 #endif