[edk2-devel] EDK2 SimpleTextIn Backspace

Andrew Fish via Groups.Io afish=apple.com at groups.io
Wed Sep 25 22:48:54 UTC 2019


Minh,

What APIs are you using to do Console IO?

At the EFI layer you don't think of SimpleTxtInEx/SimpleTextIn and SimpleTxtOut as a single console device. You need to think of them as the driver providing the service. So for example SimpleTxtInEx/SimpleTextIn could be produced by the USB Keyboard driver, and SimpleTxtOut is produced by a driver that layers on GOP (Graphics Output Protocol). Thus you have to manage the work yourself. 

If you look closely you might see that the primary console is a single device but this is the ConSplitter [1]. The ConSpliter is just managing policy as it makes a virtual ConIn (SimpleTxtInEx/SimpleTextIn) device out of all the actual ConIn devices, and sends output to all the ConOut (SimpleTxtOut). So for example your ConOut could go to Graphics and serial. Your input could come from a built-in keyboard and a USB keyboard. 

So the short answer is you need to tell SimpleTxtOut to do the right thing. SimpleTxtOut can control the cursor position. If you are some higher level UEFI Shell API that some book keeping may be happening behind your back. 

[1] https://github.com/tianocore/edk2/tree/master/MdeModulePkg/Universal/Console/ConSplitterDxe

Thanks,

Andrew Fish

> On Sep 25, 2019, at 10:27 AM, MinhQuan Tran <minhquan.tran at adlinktech.com> wrote:
> 
> Hi,
>
> I am new to Tianocore. Right now, I am trying to develop an UEFI app with interactive menu that would ask user to input values for each step. I managed to get the application to read the backspace keystroke. And when this occur, it would delete the character prior to cursor (one by one). Is there a protocol or function that allow the character delete on console?
>
> Thank you,
> Minh Quan
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48054): https://edk2.groups.io/g/devel/message/48054
Mute This Topic: https://groups.io/mt/34290869/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20190925/177297b3/attachment.htm>


More information about the edk2-devel-archive mailing list