public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrew Fish" <afish@apple.com>
To: devel@edk2.groups.io, minhquan.tran@adlinktech.com
Subject: Re: [edk2-devel] EDK2 SimpleTextIn Backspace
Date: Wed, 25 Sep 2019 15:48:54 -0700	[thread overview]
Message-ID: <49A0BEFA-0352-4B32-8A63-9C97CB563C49@apple.com> (raw)
In-Reply-To: <SN6PR05MB44139166E4E24A6938EA4EA084870@SN6PR05MB4413.namprd05.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]

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@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
> 


[-- Attachment #2: Type: text/html, Size: 3771 bytes --]

      reply	other threads:[~2019-09-25 22:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 17:27 EDK2 SimpleTextIn Backspace minhquan.tran
2019-09-25 22:48 ` Andrew Fish [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49A0BEFA-0352-4B32-8A63-9C97CB563C49@apple.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox