public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Implementing EFI_SIMPLE_TEXT_INPUT_PROTOCOL
@ 2018-09-06  3:27 Heinrich Schuchardt
  2018-09-06  5:27 ` Ni, Ruiyu
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2018-09-06  3:27 UTC (permalink / raw)
  To: Ruiyu Ni
  Cc: Leif Lindholm, Alexander Graf, Takahiro Akashi, Rob Clark,
	U-Boot Mailing List, edk2-devel

Hello Ruiyu,

currently I am struggling a bit with interpreting the UEFI spec
concerning the EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

In UEFI spec 2.7. chapter 12.1.2 ConsoleIn Definition there is this
sentence:

"Only the control characters defined in Table 100 have meaning in the
Unicode input or output streams."

Table 100:

U+0000 Null character ignored when received.
U+0008 Backspace. Moves cursor left one column.
U+0009 Tab.
U+000A Linefeed. Moves cursor  to the next line.
U+000D Carriage Return. Moves cursor to left margin of the current line.

Rob interpreted this in a patch for U-Boot such that he simply
suppressed all other Unicode characters in the 0x00-01F range except for
special treatment of 0x001b as ESC.

When I look at EDK2 function USBKeyboardReadKeyStroke()
(MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c:700) it seems that EDK2 would
pass CTRL+C as Unicode character U+0003 (cf. your patch 608817ad7114
"Change the SimpleTextInEx implementation to return CTRL+C").

The same seems to be the case in function KeyboardReadKeyStroke()
(MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c:265).

So do I get it right that for CTRL+A to CTRL+Z we should return a value
U+0001 - U+001a in Key->UnicodeChar and table 100 is about meaning of
control characters only and does *not* prescribe a filter?

But what about CTRL+[ - CTRL+_ ? Why are they suppressed in the EDK2
keyboard drivers? How do we enter U+001c - U+001f?

Best regards

Heinrich


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-06  5:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-06  3:27 Implementing EFI_SIMPLE_TEXT_INPUT_PROTOCOL Heinrich Schuchardt
2018-09-06  5:27 ` Ni, Ruiyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox