/** * @brief Read event loop. * * @param v Engine. */ static void* ui_read_input_loop(void *v) { UI *ui = (UI*) v; while (ui->event->loop && !feof(stdin) && !ferror(stdin)) { ui_read_input(ui); } info("<exit ui_read_input>\n"); return NULL; }
static VOID test_keys(VOID) { const UINTN wait_s = 10; UINTN i; ui_events_t event; Print(L"Reading keys for the next %d seconds...\n", wait_s); for (i = 0; i <= wait_s * 1000; i += 1) { event = ui_read_input(); if (event == EV_NONE) { uefi_call_wrapper(BS->Stall, 1, 1000); continue; } Print(L"Received %d key event\n", event); } }