Lines Matching +full:key +full:- +full:press

1 // SPDX-License-Identifier: GPL-2.0
20 "------------\n"
27 " of <?> <h>, or if in a data entry window then press <F1>.\n"
31 "------------\n"
33 "build. Kernel features can either be built-in, modularized, or removed.\n"
40 " - - are selected by another feature\n"
46 "listed below and press <y> to build it in, <m> to make it a module or\n"
47 "<n> to remove it. You may press the <Space> key to cycle through the\n"
50 "A trailing \"--->\" designates a submenu, a trailing \"----\" an\n"
54 "----------------------------------------------------------------------\n"
66 "Start incremental, case-insensitive search for STRING in menu entries,\n"
76 "----------------------------------------------------------------------\n"
78 "Unless in a data entry window, key <1> may be used instead of <F1>,\n"
83 "-----------------------\n"
85 "and press <Space>.\n"
89 "----------\n"
90 "Enter the requested information and press <Enter>. Hexadecimal values\n"
95 "----------------------\n"
98 "Press any of <Enter> <Esc> <q> <F5> <F9> to exit.\n"
102 "-----------------------------\n"
104 "Press <F6> to save your current configuration. Press <F7> and enter\n"
109 "----------------------\n"
120 "----------------\n"
129 "leading \"++>\" and unfolded entries by a leading \"-->\".\n"
135 "Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
136 "Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
144 "To search for menu entries press </>.\n"
148 "Press <1> instead of <F1>, <2> instead of <F2>, etc.\n"
149 "For verbose global help use key <1>.\n"
150 "For help related to the current menu entry press <?> or <h>.\n",
152 "Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
153 "Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
161 "To search for menu entries press </>.\n"
165 "For verbose global help press <F1>.\n"
166 "For help related to the current menu entry press <?> or <h>.\n",
168 "Press <Up>, <Down>, <Home> or <End> to navigate a radiolist, select\n"
170 "For help related to the current entry press <?> or <h>.\n"
171 "For global help press <F1>.\n",
175 "Press <Enter> to apply, <Esc> to cancel.",
178 "Press <Enter> to apply, <Esc> to cancel.",
181 "Press <Enter> to apply, <Esc> to cancel.",
215 "-----------------------------------------------------------------\n"
221 " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
222 " -> PCI support (PCI [ = y])\n"
223 "(1) -> PCI access mode (<choice> [ = y])\n"
226 "-----------------------------------------------------------------\n"
238 " Press the key in the (#) prefix to jump directly to that\n"
295 typedef void (*function_key_handler_t)(int *key, struct menu *menu);
296 static void handle_f1(int *key, struct menu *current_item);
297 static void handle_f2(int *key, struct menu *current_item);
298 static void handle_f3(int *key, struct menu *current_item);
299 static void handle_f4(int *key, struct menu *current_item);
300 static void handle_f5(int *key, struct menu *current_item);
301 static void handle_f6(int *key, struct menu *current_item);
302 static void handle_f7(int *key, struct menu *current_item);
303 static void handle_f8(int *key, struct menu *current_item);
304 static void handle_f9(int *key, struct menu *current_item);
309 function_key key; member
318 .key = F_HELP,
324 .key = F_SYMBOL,
330 .key = F_INSTS,
336 .key = F_CONF,
342 .key = F_BACK,
348 .key = F_SAVE,
354 .key = F_LOAD,
360 .key = F_SEARCH,
366 .key = F_EXIT,
380 mvwprintw(main_window, lines-3, offset, in print_function_line()
385 mvwprintw(main_window, lines-3, in print_function_line()
394 static void handle_f1(int *key, struct menu *current_item) in handle_f1() argument
402 static void handle_f2(int *key, struct menu *current_item) in handle_f2() argument
409 static void handle_f3(int *key, struct menu *current_item) in handle_f3() argument
418 static void handle_f4(int *key, struct menu *current_item) in handle_f4() argument
434 static void handle_f5(int *key, struct menu *current_item) in handle_f5() argument
436 *key = KEY_LEFT; in handle_f5()
441 static void handle_f6(int *key, struct menu *current_item) in handle_f6() argument
448 static void handle_f7(int *key, struct menu *current_item) in handle_f7() argument
455 static void handle_f8(int *key, struct menu *current_item) in handle_f8() argument
462 static void handle_f9(int *key, struct menu *current_item) in handle_f9() argument
468 /* return != 0 to indicate the key was handles */
469 static int process_special_keys(int *key, struct menu *menu) in process_special_keys() argument
473 if (*key == KEY_RESIZE) { in process_special_keys()
479 if (*key == KEY_F(function_keys[i].key) || in process_special_keys()
480 *key == '0' + function_keys[i].key){ in process_special_keys()
481 function_keys[i].handler(key, menu); in process_special_keys()
502 /* return the index of the matched item, or -1 if no such item exists */
510 return -1; in get_mext_match()
515 --match_start; in get_mext_match()
525 --index; in get_mext_match()
530 return -1; in get_mext_match()
539 if (items_num > MAX_MENU_ITEMS-1) in item_make()
578 int index = items_num-1; in item_add_str()
612 return mcur->tag; in item_tag()
629 return mcur->usrptr; in item_data()
642 snprintf(menu_backtitle, sizeof(menu_backtitle), "%s - %s", in set_config_filename()
643 config_filename, rootmenu.prompt->text); in set_config_filename()
649 * -1 means go on doing what you were doing
666 return -1; in do_exit()
699 static int next_jump_key(int key) in next_jump_key() argument
701 if (key < '1' || key > '9') in next_jump_key()
704 key++; in next_jump_key()
706 if (key > '9') in next_jump_key()
707 key = '1'; in next_jump_key()
709 return key; in next_jump_key()
712 static int handle_search_keys(int key, size_t start, size_t end, void *_data) in handle_search_keys() argument
718 if (key < '1' || key > '9') in handle_search_keys()
721 list_for_each_entry(pos, data->head, entries) { in handle_search_keys()
724 if (pos->offset < start) in handle_search_keys()
727 if (pos->offset >= end) in handle_search_keys()
730 if (key == index) { in handle_search_keys()
731 data->target = pos->target; in handle_search_keys()
798 selected_conf(data.target->parent, data.target); in search_conf()
820 sym = menu->sym; in build_conf()
821 prop = menu->prompt; in build_conf()
826 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; in build_conf()
833 menu->data ? "-->" : "++>", in build_conf()
839 menu_is_empty(menu) ? "----" : "--->"); in build_conf()
841 if (single_menu_mode && menu->data) in build_conf()
856 item_make(menu, ':', "---%*c%s", in build_conf()
872 for (child = menu->list; child; child = child->next) { in build_conf()
873 if (menu_is_visible(child) && child->sym == def_sym) in build_conf()
909 item_add_str(" --->"); in build_conf()
910 if (def_menu->list) { in build_conf()
913 indent -= 2; in build_conf()
921 "---%*c%s", indent + 1, in build_conf()
936 item_make(menu, 't', "-%c-", in build_conf()
952 if (sym->rev_dep.tri == mod) in build_conf()
959 item_make(menu, 't', "-%c-", ch); in build_conf()
965 tmp = indent - tmp + 4; in build_conf()
980 if (menu->prompt && menu->prompt->type == P_MENU) { in build_conf()
981 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); in build_conf()
988 for (child = menu->list; child; child = child->next) in build_conf()
990 indent -= doint; in build_conf()
1009 toprow = max(selected_index-mwin_max_lines/2, 0); in center_item()
1010 if (toprow >= item_count(curses_menu)-mwin_max_lines) in center_item()
1011 toprow = item_count(curses_menu)-mwin_max_lines; in center_item()
1045 maxx = min(maxx, mwin_max_cols-2); in show_menu()
1051 (mwin_max_cols-maxx)/2); in show_menu()
1088 /* Return 0 means I have handled the key. In such a case, ans should hold the
1089 * item to center, or -1 otherwise.
1090 * Else return -1 .
1092 static int do_match(int key, struct match_state *state, int *ans) in do_match() argument
1094 char c = (char) key; in do_match()
1096 *ans = -1; in do_match()
1097 if (key == '/' || (state->in_search && key == 27)) { in do_match()
1101 state->in_search = 1-state->in_search; in do_match()
1102 bzero(state->pattern, sizeof(state->pattern)); in do_match()
1103 state->match_direction = MATCH_TINKER_PATTERN_DOWN; in do_match()
1105 } else if (!state->in_search) in do_match()
1109 state->pattern[strlen(state->pattern)] = c; in do_match()
1110 state->pattern[strlen(state->pattern)] = '\0'; in do_match()
1111 adj_match_dir(&state->match_direction); in do_match()
1112 *ans = get_mext_match(state->pattern, in do_match()
1113 state->match_direction); in do_match()
1114 } else if (key == KEY_DOWN) { in do_match()
1115 state->match_direction = FIND_NEXT_MATCH_DOWN; in do_match()
1116 *ans = get_mext_match(state->pattern, in do_match()
1117 state->match_direction); in do_match()
1118 } else if (key == KEY_UP) { in do_match()
1119 state->match_direction = FIND_NEXT_MATCH_UP; in do_match()
1120 *ans = get_mext_match(state->pattern, in do_match()
1121 state->match_direction); in do_match()
1122 } else if (key == KEY_BACKSPACE || key == 8 || key == 127) { in do_match()
1123 state->pattern[strlen(state->pattern)-1] = '\0'; in do_match()
1124 adj_match_dir(&state->match_direction); in do_match()
1129 state->in_search = 0; in do_match()
1130 bzero(state->pattern, sizeof(state->pattern)); in do_match()
1134 return -1; in do_match()
1169 if ((struct menu *) mcur->usrptr == active_menu) { in selected_conf()
1191 if (current_index != -1) in selected_conf()
1248 sym = submenu->sym; in selected_conf()
1262 submenu->data = in selected_conf()
1263 (void *) (long) !submenu->data; in selected_conf()
1271 else if (submenu->prompt && in selected_conf()
1272 submenu->prompt->type == P_MENU) in selected_conf()
1334 active = sym_get_choice_value(menu->sym); in conf_choice()
1339 for (i = 0, child = menu->list; child; child = child->next) { in conf_choice()
1343 if (child->sym == sym_get_choice_value(menu->sym)) in conf_choice()
1346 else if (child->sym) in conf_choice()
1353 if (child->sym == active){ in conf_choice()
1374 if (selected_index != -1) in conf_choice()
1420 if (!child || !menu_is_visible(child) || !child->sym) in conf_choice()
1426 sym_set_tristate_value(child->sym, yes); in conf_choice()
1431 active = child->sym; in conf_choice()
1447 switch (sym_get_type(menu->sym)) { in conf_string()
1463 sym_get_string_value(menu->sym), in conf_string()
1468 if (sym_set_string_value(menu->sym, in conf_string()
1556 main_window = newwin(lines-2, columns-2, 2, 1); in setup_windows()
1558 mwin_max_lines = lines-7; in setup_windows()
1559 mwin_max_cols = columns-6; in setup_windows()
1570 if (ac > 1 && strcmp(av[1], "-s") == 0) { in main()