menu: Support HOME and END shortcuts

This commit is contained in:
mintsuki 2022-02-04 22:30:53 +01:00
parent aae5e6f779
commit 6e0fde5cfb
1 changed files with 6 additions and 0 deletions

View File

@ -832,6 +832,12 @@ timeout_aborted:
}
goto refresh;
}
case GETCHAR_HOME:
selected_entry = 0;
goto refresh;
case GETCHAR_END:
selected_entry = max_entries - 1;
goto refresh;
case GETCHAR_CURSOR_UP:
if (selected_entry == 0)
selected_entry = max_entries - 1;