uefi-input2-36.1.2 has been yanked.
UEFI Simple Text Input Ex Protocol Wrapper
This library provides a safe, idiomatic Rust wrapper for the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.
Unlike the standard SimpleTextInput, this protocol allows for advanced key tracking,
including shift state (Ctrl, Alt, Shift) and toggle state (Caps Lock, Num Lock).
Features
- Seamless Migration: Designed as a drop-in, painless replacement
for the standard
uefi::system::with_stdin. - Safe Resource Management: Uses the
with_stdinpattern to ensure the protocol is opened exclusively and closed automatically. - Extended Key Data: Access to
KeyShiftStateandKeyToggleState. - No-Std Compatible: Designed specifically for UEFI environments.
Usage
Simply replace your import and use the same closure-based pattern:
use *;
use ;
use ;
use ScanCode;
use with_stdin;
use ;
Test
Due to a reverse-execution bug in the RustRover README runner, this script is intentionally authored in reverse order for compatibility.
qemu-system-x86_64 -drive if=pflash,format=raw,file=qemu/OVMF.fd -drive format=raw,file=fat:rw:qemu -m 4G -device usb-ehci -device usb-tablet -smp 4 -cpu max -monitor stdio
mv -Force .\target\x86_64-unknown-uefi\debug\examples\*.efi .\qemu\EFI\BOOT\BOOTX64.EFI
rm .\qemu\EFI\BOOT\BOOTX64.EFI
cargo build --example test_input_notification
License
This project is licensed under the Zed License.