From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=P5eO3f9q; spf=pass (domain: apple.com, ip: 17.151.62.66, mailfrom: afish@apple.com) Received: from nwk-aaemail-lapp01.apple.com (nwk-aaemail-lapp01.apple.com [17.151.62.66]) by groups.io with SMTP; Wed, 25 Sep 2019 15:49:12 -0700 Received: from pps.filterd (nwk-aaemail-lapp01.apple.com [127.0.0.1]) by nwk-aaemail-lapp01.apple.com (8.16.0.27/8.16.0.27) with SMTP id x8PMb4Kj049291; Wed, 25 Sep 2019 15:49:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=sender : from : content-type : mime-version : subject : date : references : to : in-reply-to : message-id; s=20180706; bh=4bvraNRTyi9b/7FBNL4EqYrhC2dn847TXhIv+K1l+8E=; b=P5eO3f9q7fgonxMlpPm2NH9PDtF1ebDZ7ZeittrizW0pjO0TIqwyfWjilIOPNFRs42Oh U6upnJKwThe3FF0HLtmOJcCvJfQ9ZWpfTXrlcVoV/BxiJwuV7JMWyJKTPgXWoPmAzrHU iwrJR449J/GglQAVrfQAMpfJqKwIeUkWWuWBSmfpqx1sgpqhNKe2FVu8e60VpxZfi+8f nsAuAUWulZhhm6IYzh5ofvPbXJFEt6Ox29e70K7a3Hg6Yokul5xArdYIPF1zjZvGYuvF ICn1iZwggEJ0kfqDO7mH2xKXgIQj7FpGfAADn9VxWcTp095KyIlX2ZXMeOiCzaE8tDPt wQ== Received: from mr2-mtap-s02.rno.apple.com (mr2-mtap-s02.rno.apple.com [17.179.226.134]) by nwk-aaemail-lapp01.apple.com with ESMTP id 2v5jt12jfj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 25 Sep 2019 15:49:04 -0700 Received: from nwk-mmpp-sz13.apple.com (nwk-mmpp-sz13.apple.com [17.128.115.216]) by mr2-mtap-s02.rno.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPS id <0PYE00JRISPR5E10@mr2-mtap-s02.rno.apple.com>; Wed, 25 Sep 2019 15:49:03 -0700 (PDT) Received: from process_milters-daemon.nwk-mmpp-sz13.apple.com by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) id <0PYE00300SHP4E00@nwk-mmpp-sz13.apple.com>; Wed, 25 Sep 2019 15:48:56 -0700 (PDT) X-Va-CD: 0 X-Va-ID: 9c0b9ed6-5691-4ae4-9667-e831e6e9659d X-V-A: X-V-T-CD: c9f51851ddce8f9f3688bbbe4c257342 X-V-E-CD: 66c481fe64168e1f3e1c6217739b1f87 X-V-R-CD: 726239c512bc122a87cfe362102586f1 X-V-CD: 0 X-V-ID: 2fbee4ea-beaa-48ac-ae0c-51aeefc5469d X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-09-25_10:,, signatures=0 Received: from [17.226.41.87] (unknown [17.226.41.87]) by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPSA id <0PYE000B7SPJD760@nwk-mmpp-sz13.apple.com>; Wed, 25 Sep 2019 15:48:56 -0700 (PDT) Sender: afish@apple.com From: "Andrew Fish" MIME-version: 1.0 (Mac OS X Mail 13.0 \(3594.4.17\)) Subject: Re: [edk2-devel] EDK2 SimpleTextIn Backspace Date: Wed, 25 Sep 2019 15:48:54 -0700 References: To: devel@edk2.groups.io, minhquan.tran@adlinktech.com In-reply-to: Message-id: <49A0BEFA-0352-4B32-8A63-9C97CB563C49@apple.com> X-Mailer: Apple Mail (2.3594.4.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-09-25_10:,, signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_367E352E-008D-407B-AE91-B5A89AA031CB" --Apple-Mail=_367E352E-008D-407B-AE91-B5A89AA031CB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Minh, What APIs are you using to do Console IO? At the EFI layer you don't think of SimpleTxtInEx/SimpleTextIn and SimpleT= xtOut as a single console device. You need to think of them as the driver p= roviding the service. So for example SimpleTxtInEx/SimpleTextIn could be pr= oduced 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.=20 If you look closely you might see that the primary console is a single dev= ice 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 c= ould come from a built-in keyboard and a USB keyboard.=20 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 leve= l UEFI Shell API that some book keeping may be happening behind your back.= =20 [1] https://github.com/tianocore/edk2/tree/master/MdeModulePkg/Universal/C= onsole/ConSplitterDxe Thanks, Andrew Fish > On Sep 25, 2019, at 10:27 AM, MinhQuan Tran wrote: >=20 > Hi, > > I am new to Tianocore. Right now, I am trying to develop an UEFI app wit= h interactive menu that would ask user to input values for each step. I man= aged 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 >=20 --Apple-Mail=_367E352E-008D-407B-AE91-B5A89AA031CB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Minh,
<= br class=3D"">
What APIs are you using to do Console I= O?

At th= e 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 providi= ng 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. 

I= f you look closely you might see that the primary console is a single devic= e but this is the ConSplitter [1]. The ConSpliter is just managing policy a= s it makes a virtual ConIn (SimpleTxtInEx/SimpleTextIn) device out of all t= he actual ConIn devices, and sends output to all the ConOut (SimpleTxtOut).= So for example your ConOut could go to Graphics and serial. Your input cou= ld 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 c= ursor position. If you are some higher level UEFI Shell API that some book = keeping may be happening behind your back. 


Thanks,

Andrew Fish

On Sep 25, 2019, at 10:27 AM, MinhQuan Tran <<= a href=3D"mailto:minhquan.tran@adlinktech.com" class=3D"">minhquan.tran@adl= inktech.com> wrote:

Hi,
 
I am new to Tianocore. Right now, I am trying to develop an UEFI a= pp 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
=

--Apple-Mail=_367E352E-008D-407B-AE91-B5A89AA031CB--