From patchwork Wed Jul 8 19:02:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 50906 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B1F9B22A03 for ; Wed, 8 Jul 2015 19:03:28 +0000 (UTC) Received: by lbcpe5 with SMTP id pe5sf26561881lbc.3 for ; Wed, 08 Jul 2015 12:03:27 -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=D/sYMAIk2oHN3Uj4ofIow0nYhBAIwSqFwxrJ9urPUqb6mHaxzEYo5jzDya6ENM+1CR w8CppitCkY5+p6YwSyuRNVjkWp7e/nIl0ibUw4xHWkvX3jeRz+SBM1iK8Z8TUKGgUjL9 YKFDnsJbk6U1xH1zuO0WjfvoIAbBNXIma3ZG8Qz+SmKsvm4bcybwykL8KmBWOp+T9x4z BizDsEbR+OrQVD0G3VF0RtKU+EdpEio6CUqi+BipVbJw+g6Cp6UaqEwZx4g9zpFZIbrm xGjsw/Ov+mSXC7Ir9gRWmZB291oERzd3xRfHe5Jmm0nYuKYygrKK/j2GDdfpu2dqWfAd rBAQ== X-Gm-Message-State: ALoCoQlTwOzDKvQCT5GQrg+YOFTlaetAtjsBSAmaMBGSdTstzj2K8ADiH0Ade5Tk0qYTpEdUKxmV X-Received: by 10.112.189.131 with SMTP id gi3mr5545636lbc.6.1436382207316; Wed, 08 Jul 2015 12:03:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.65 with SMTP id r1ls992827lag.61.gmail; Wed, 08 Jul 2015 12:03:27 -0700 (PDT) X-Received: by 10.112.162.38 with SMTP id xx6mr10993986lbb.110.1436382207170; Wed, 08 Jul 2015 12:03:27 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id k5si2731080lbq.22.2015.07.08.12.03.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 12:03:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbcpe5 with SMTP id pe5so61892853lbc.2 for ; Wed, 08 Jul 2015 12:03:26 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr11012942lbb.36.1436382206727; Wed, 08 Jul 2015 12:03:26 -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 hn6csp153021lbb; Wed, 8 Jul 2015 12:03:25 -0700 (PDT) X-Received: by 10.50.50.98 with SMTP id b2mr20874478igo.42.1436382204744; Wed, 08 Jul 2015 12:03:24 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id gt9si3496270icb.96.2015.07.08.12.03.24 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 08 Jul 2015 12:03:24 -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-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZCucl-0005TM-Hj; Wed, 08 Jul 2015 19:03:15 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZCuck-0005TD-LD for edk2-devel@lists.sourceforge.net; Wed, 08 Jul 2015 19:03:14 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.220.44 as permitted sender) client-ip=209.85.220.44; envelope-from=roy.franz@linaro.org; helo=mail-pa0-f44.google.com; Received: from mail-pa0-f44.google.com ([209.85.220.44]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1ZCucj-0005vY-P3 for edk2-devel@lists.sourceforge.net; Wed, 08 Jul 2015 19:03:14 +0000 Received: by pactm7 with SMTP id tm7so136308516pac.2 for ; Wed, 08 Jul 2015 12:03:08 -0700 (PDT) X-Received: by 10.70.43.203 with SMTP id y11mr23207098pdl.18.1436382188072; Wed, 08 Jul 2015 12:03:08 -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 nk1sm3322254pdb.36.2015.07.08.12.03.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 12:03:06 -0700 (PDT) From: Roy Franz To: edk2-devel@lists.sourceforge.net, feng.tian@intel.com, lersek@redhat.com, ard.biesheuvel@linaro.org Date: Wed, 8 Jul 2015 12:02:49 -0700 Message-Id: <1436382172-27491-3-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436382172-27491-1-git-send-email-roy.franz@linaro.org> References: <1436382172-27491-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 -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1ZCucj-0005vY-P3 Subject: [edk2] [PATCH V4 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.177 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;