uefi-rs icon indicating copy to clipboard operation
uefi-rs copied to clipboard

Feature: Allow to read key modifiers

Open axet opened this issue 1 month ago • 6 comments

Currently only key strokes allowed to read. Here is no way detecting shift / alt keys.

axet avatar Nov 01 '25 16:11 axet

Can you please elaborate a little more what specifically you were doing, i.e., which library function/uefi protocol?

And what does RFF stand for?

phip1611 avatar Nov 01 '25 18:11 phip1611

RFF stands for Request for feature.

I'm writing simple uefi boot chain loader. Simple functionality boot linux kernel. Same as grub, but much simpler. OpenSource. Right now I able to boot uki kernel's but I already I have impressive 28kb size loader. But limited functionality.

First I want to open boot menu when shift or alt key pressed during the boot. Otherwise it should continue booting with no delay. Second I need direct kernel booting with FDL. But that is another issue.

  • https://gitlab.com/axet/efichainloader

axet avatar Nov 01 '25 19:11 axet

If you mean during BDS timeout, then that requires patching edk2. Otherwise, only default hotkeys like F2 (to enter BIOS) and Enter (to continue boot) will work, and it will eat all keys to empty the queue before running the payload.

  • https://github.com/system76/edk2/commit/00283317d8ebc291a52498d7421cc6b01addc48b

Outside of that: SimpleTextInput doesn't support modifiers, so SimpleTextInputEx would be required.

crawfxrd avatar Nov 26 '25 22:11 crawfxrd

No. I'm not talking about BDS, I'm talking about custom uefi binaries with advanced key modifers reading.

axet avatar Nov 29 '25 18:11 axet

Is this supported by a UEFI protocol?

You mentioned grub -- could you research how they implement this functionality and report back here with code search links? If they do it via UEFI then we can probably add that functionality to this library. On the other hand, if they are doing it "manually" (e.g. with direct USB keyboard monitoring, or something like that) then it might not belong in this library.

nicholasbishop avatar Nov 29 '25 18:11 nicholasbishop

I never said grub has it. No idea if that feature it required a protocol support implementation or a hack. I only ask for nice feature to have.

axet avatar Dec 07 '25 04:12 axet