# UEFI's fancy keyboard

The unit at [drv/efi/kbdex.fs] wraps ReadKeyStrokeEx, which is only present in
UEFI. Unlike [drv/efi/kbd], it has the ability to track mod keys status so that
we can detect key presses like CTRL+something. Fancy right?

Unfortunately, setting this keyboard up is more trouble because there is more
than one SIMPLE_INPUT_EX_PROTOCOL implementations. Therefore, do set it up,
you'll first have to figure out which protocol you want to use.

We identify those protocols like we do in [drv/efi/blkio], by index.

First of all, there is "bootkbd", which yields the kbd index of the
ConsoleInHandle. It's most likely what you're interested in.

You can also use "lskbdex", which will print out paths of all found protocols.

Then, you create a [io/kbd] struct by supplying its constructor with that ID.

## Example initialization

  needs drv/efi/kbdex
  bootkbd newefikbdex !{>keyboard}

## API

bootkbd ( -- kbdid )
  Yields the ID corresponding to ConsoleInHandle.

lskbdex ( -- )
  Prints out all SIMPLE_INPUT_EX_PROTOCOL we can find along with their devpath.

newefikbdex ( kbdid -- )
  Allocates a new [io/kbd] wired on ReadKeyStrokeEx using the specified
  protocol.
