mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
*Really* make space accelerators work; no wonder Brian McGovern was
confused! I fat-fingered the first commit.
This commit is contained in:
parent
fb8e78a523
commit
9639dc68d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54720
@ -255,7 +255,7 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
|
||||
|
||||
/* Check if key pressed matches first character of any item tag in list */
|
||||
for (i = 0; i < max_choice; i++)
|
||||
if (isprint(key) && key < 0x100 && toupper(key) == toupper(items[(scroll+i)*3][0]))
|
||||
if (key != ' ' && key < 0x100 && toupper(key) == toupper(items[(scroll+i)*3][0]))
|
||||
break;
|
||||
|
||||
if (i < max_choice || (key >= '1' && key <= MIN('9', '0'+max_choice)) ||
|
||||
|
@ -233,7 +233,7 @@ dialog_menu(unsigned char *title, unsigned char *prompt, int height, int width,
|
||||
|
||||
/* Check if key pressed matches first character of any item tag in menu */
|
||||
for (i = 0; i < max_choice; i++)
|
||||
if (key < 0x100 && isprint(key) && toupper(key) == toupper(items[(scroll + i) * 2][0]))
|
||||
if (key < 0x100 && key != ' ' && toupper(key) == toupper(items[(scroll + i) * 2][0]))
|
||||
break;
|
||||
|
||||
if (i < max_choice || (key >= '1' && key <= MIN('9', '0'+max_choice)) || KEY_IS_UP(key) || KEY_IS_DOWN(key)) {
|
||||
|
@ -265,7 +265,7 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi
|
||||
|
||||
/* Check if key pressed matches first character of any item tag in list */
|
||||
for (i = 0; i < max_choice; i++)
|
||||
if (isprint(key) && toupper(key) == toupper(items[(scroll + i) * 3][0]))
|
||||
if (key != ' ' && toupper(key) == toupper(items[(scroll + i) * 3][0]))
|
||||
break;
|
||||
if (i < max_choice || (key >= '1' && key <= MIN('9', '0' + max_choice)) ||
|
||||
KEY_IS_UP(key) || KEY_IS_DOWN(key) || key == ' ') {
|
||||
|
Loading…
Reference in New Issue
Block a user