add vim keys in menu
Some checks failed
/ sync-to-origin (push) Has been cancelled

This commit is contained in:
PoliEcho 2025-04-01 13:18:02 +02:00
parent 52bea2e3c5
commit 74dc204f22

View File

@ -13,7 +13,7 @@
wchar_t *choices[] = {
L"login", L"Marks", L"timetable", L"Komens",
L"Homework", L"Absence", L"Exit", (wchar_t *)NULL,
L"Homework", L"Absence", L"Exit", nullptr,
};
void (*choicesFuncs[])() = {nullptr, marks_page, timetable_page, nullptr,
nullptr, nullptr, nullptr, nullptr};
@ -79,15 +79,14 @@ void main_menu() {
while ((c = getch()) != KEY_F(1)) {
switch (c) {
case KEY_DOWN:
menu_driver(my_menu, REQ_DOWN_ITEM);
break;
case KEY_UP:
menu_driver(my_menu, REQ_UP_ITEM);
break;
case KEY_NPAGE:
case 'j':
menu_driver(my_menu, REQ_DOWN_ITEM);
break;
case KEY_PPAGE:
case KEY_UP:
case KEY_PPAGE:
case 'k':
menu_driver(my_menu, REQ_UP_ITEM);
break;
case 10: // ENTER
@ -107,4 +106,4 @@ void main_menu() {
for (i = 0; i < n_choices; ++i)
free_item(my_items[i]);
endwin();
}
}