From patchwork Wed Jul 8 00:44:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 50852 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5B0D622A0E for ; Wed, 8 Jul 2015 00:44:54 +0000 (UTC) Received: by laer2 with SMTP id r2sf62148415lae.3 for ; Tue, 07 Jul 2015 17:44:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=au0zYadRtUmmZAsU6EqfSzb9GMgUGumDWMzqgM7Tebc=; b=LGglBDKfV5bgOzngt0siWoQ5ND7BSRVxQ1LiLx2zisoNotShdJ2ubn/JleyN+3+3fS LxkhpdHpH0cF8DawJQQuRWZP0fTnsBqXyW4ns6w/BQfxdohxCBMJb62dHVS3BcwL+8W6 tI+I5X0Z6comwCWIxo6iCLetD8TH88q2+7jJNaEs2E3+CmAYnobMKmeB5n/b7MqJAUx6 /5vGbvd0x3nWI+aDAznXwxP86IF2Nw6iKcRqxWBCZfp6WOsQZ4MDUmIupqqd0K2LTG9u 66ntucctQ90YZ/tfsXMgZv//SdA+jBoNQ0CJK+6KS/hDSy0/Bs5kPFoEzg1bVluyDloc hTBA== X-Gm-Message-State: ALoCoQmcmqymLXPxh3FPlS639YYxZXOWCS7fhKp5qvpd1zbUEqrhXZ+xkaTICg7uL/4xYLvUBTbY X-Received: by 10.112.148.101 with SMTP id tr5mr3340828lbb.13.1436316293433; Tue, 07 Jul 2015 17:44:53 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.129 with SMTP id s1ls949629las.89.gmail; Tue, 07 Jul 2015 17:44:53 -0700 (PDT) X-Received: by 10.152.30.34 with SMTP id p2mr6476903lah.89.1436316293199; Tue, 07 Jul 2015 17:44:53 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id pw2si374639lbb.33.2015.07.07.17.44.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jul 2015 17:44:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbpo10 with SMTP id po10so46716086lbb.3 for ; Tue, 07 Jul 2015 17:44:53 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr6515463lbb.36.1436316293056; Tue, 07 Jul 2015 17:44:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2725718lbb; Tue, 7 Jul 2015 17:44:52 -0700 (PDT) X-Received: by 10.107.138.20 with SMTP id m20mr12457026iod.40.1436316290253; Tue, 07 Jul 2015 17:44:50 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id co3si1040383icb.9.2015.07.07.17.44.49 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 07 Jul 2015 17:44:50 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZCdTd-0004ZE-1F; Wed, 08 Jul 2015 00:44:41 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZCdTb-0004Z8-I4 for edk2-devel@lists.sourceforge.net; Wed, 08 Jul 2015 00:44:39 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.220.45 as permitted sender) client-ip=209.85.220.45; envelope-from=roy.franz@linaro.org; helo=mail-pa0-f45.google.com; Received: from mail-pa0-f45.google.com ([209.85.220.45]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1ZCdTa-000681-TN for edk2-devel@lists.sourceforge.net; Wed, 08 Jul 2015 00:44:39 +0000 Received: by pactm7 with SMTP id tm7so121504851pac.2 for ; Tue, 07 Jul 2015 17:44:33 -0700 (PDT) X-Received: by 10.66.190.228 with SMTP id gt4mr14430850pac.72.1436316273292; Tue, 07 Jul 2015 17:44:33 -0700 (PDT) Received: from localhost.localdomain (c-73-41-93-56.hsd1.ca.comcast.net. [73.41.93.56]) by smtp.gmail.com with ESMTPSA id tm3sm337917pac.44.2015.07.07.17.44.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jul 2015 17:44:32 -0700 (PDT) From: Roy Franz To: edk2-devel@lists.sourceforge.net, feng.tian@intel.com, lersek@redhat.com, ard.biesheuvel@linaro.org Date: Tue, 7 Jul 2015 17:44:15 -0700 Message-Id: <1436316258-19655-3-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436316258-19655-1-git-send-email-roy.franz@linaro.org> References: <1436316258-19655-1-git-send-email-roy.franz@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1ZCdTa-000681-TN Subject: [edk2] [PATCH V3 2/5] Treat ASCII 0x7F as backspace for TtyTerm terminals X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: roy.franz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Treat ASCII 0x7F as backspace, rather than delete, for TTY terminals. This better matches the default Linux terminal settings that are used when connecting to a simulated platform using xterm or a similar terminal program. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz Reviewed-by: Ard Biesheuvel --- MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 17a1244..227df85 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -1561,8 +1561,14 @@ UnicodeToEfiKey ( } if (UnicodeChar == DEL) { - Key.ScanCode = SCAN_DELETE; - Key.UnicodeChar = 0; + if (TerminalDevice->TerminalType == TTYTERMTYPE) { + Key.ScanCode = SCAN_NULL; + Key.UnicodeChar = CHAR_BACKSPACE; + } + else { + Key.ScanCode = SCAN_DELETE; + Key.UnicodeChar = 0; + } } else { Key.ScanCode = SCAN_NULL; Key.UnicodeChar = UnicodeChar;