grub4dos
grub4dos copied to clipboard
grub4efi - support a test for keyboard status
In grub4dos we can use bios utility to check for status of keyboard modifier keys, e.g.
# If special key on then do something different...
# ONLY WORKS IN BIOS MODE - NOT UEFI
set n=0
/bios int=0x16 eax=0x00000200 > (md)0x300+1
cat --skip=12 --length=2 (md)0x300+1 | set /a n=0x > nul
# bits in n = RShift=01, LShift=02, CTRL=04, ALT=08,SCROLL LOCK=0x10, NUM LOCK=0x20, CAPS LOCK=0x40
if exist n calc %n%&0x40 > nul && call /special.g4b
Is there a way to detect keyboard modifier keys in grub4efi - preferably returns same bits set? without waiting for key press.