1 /* $NetBSD: t7.c,v 1.1.1.1 2014/04/01 16:16:06 jakllsch Exp $ */ 2 3 #include <efi.h> 4 #include <efilib.h> 5 6 EFI_STATUS 7 efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab) 8 { 9 EFI_INPUT_KEY efi_input_key; 10 EFI_STATUS efi_status; 11 12 InitializeLib(image, systab); 13 14 Print(L"HelloLib application started\n"); 15 16 Print(L"\n\n\nHit any key to exit this image\n"); 17 WaitForSingleEvent(ST->ConIn->WaitForKey, 0); 18 19 uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, L"\n\n"); 20 21 efi_status = uefi_call_wrapper(ST->ConIn->ReadKeyStroke, 2, ST->ConIn, &efi_input_key); 22 23 Print(L"ScanCode: %xh UnicodeChar: %xh\n", 24 efi_input_key.ScanCode, efi_input_key.UnicodeChar); 25 26 return EFI_SUCCESS; 27 } 28