"\n"
"By selecting the 'Add Device' button new devices can be added to the autoboot \
list, either by UUID, MAC address, or device type. Once added to the boot \
-order, the priority of devices can be changed with the 'left' and 'right' keys \
-Devices can be individually removed from the boot order with the minus key. \
+order, the priority of devices can be changed with the '-' (minus) and \
+'+' (plus) keys. \
+Devices can be individually removed from the boot order with the 'delete' or \
+'backspace' keys. \
Use this option if you have multiple operating system images installed.\n"
"\n"
"To autoboot from any device, select the 'Clear & Boot Any' button. \
return key == ' ' || key == '\r' || key == '\n' || key == KEY_ENTER;
}
-static bool key_is_minus(int key)
-{
- return key == 055;
-}
-
-static bool key_is_left(int key)
-{
- return key == KEY_LEFT;
-}
-
-static bool key_is_right(int key)
-{
- return key == KEY_RIGHT;
-}
-
static bool process_key_nop(struct nc_widget *widget __attribute__((unused)),
FORM *form __attribute((unused)),
int key __attribute__((unused)))
int i, val, opt_idx = -1;
FIELD *field;
- if (!key_is_minus(key) && !key_is_left(key) && !key_is_right(key))
+ if (key != '-' && key != '+' && key != KEY_DC && key != KEY_BACKSPACE)
return false;
field = current_field(form);
if (opt_idx < 0)
return false;
- if (key_is_minus(key))
+ if (key == KEY_DC || key == KEY_BACKSPACE)
subset_delete_active(subset, opt_idx);
- if (key_is_left(key)){
+ if (key == '-') {
if (opt_idx == 0)
return true;
subset->active[opt_idx - 1] = val;
}
- if (key_is_right(key)){
+ if (key == '+') {
if (opt_idx >= subset->n_active - 1)
return true;