From patchwork Wed May 13 23:53:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 48471 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AE93621411 for ; Wed, 13 May 2015 23:54:35 +0000 (UTC) Received: by wgvl6 with SMTP id l6sf12561996wgv.2 for ; Wed, 13 May 2015 16:54:34 -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=lgeIvoGRg7+560FyIv/Xq8P0bAZWvQ4c8HnCfn+CjY8=; b=gtMTWGQQRGiSWIuwNmK01UBGI5eWo0648Ig1OMUFIhhDylJjP1FRI4CYbhlFrjMJna oPv6Il+uoKP7zqaU5+9sx0mGVzDJX+vYjCBD9TSckLAMBblnttuBzblAi5bADl4Ov2v6 kUVvnkY0M+ukWQf3b7MMD/Vg1oRnszVM3aKHLs9BX0o1rPvIfg7cY6T08tI2dppTuRen JWFQRBE6WSa68DH5Wt3ekfds+CQpSL92GYCALIgiefh7THWpmpTVuOEYYbBoG9yatZtk THMlSTAO/Fdju4aqfwbcRk2MUNqqOEN0aPFP6tu1RNyFra6Kq2rcxTTUMNAfjkUeLnHL S7aQ== X-Gm-Message-State: ALoCoQk5/Jxdn3UO/2+PBVsB+qO1vzkpmDOg6w6A8hPfIeBz6zqJrYFiU9T2EueFxzO75YmkWwxJ X-Received: by 10.112.171.41 with SMTP id ar9mr978834lbc.24.1431561274846; Wed, 13 May 2015 16:54:34 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.102 with SMTP id s6ls338285lag.73.gmail; Wed, 13 May 2015 16:54:34 -0700 (PDT) X-Received: by 10.152.179.39 with SMTP id dd7mr959974lac.118.1431561274699; Wed, 13 May 2015 16:54:34 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id o1si13330851lbc.8.2015.05.13.16.54.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2015 16:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by laat2 with SMTP id t2so45102171laa.1 for ; Wed, 13 May 2015 16:54:34 -0700 (PDT) X-Received: by 10.112.140.231 with SMTP id rj7mr992958lbb.76.1431561274602; Wed, 13 May 2015 16:54:34 -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 hn6csp844888lbb; Wed, 13 May 2015 16:54:33 -0700 (PDT) X-Received: by 10.50.62.148 with SMTP id y20mr31267477igr.17.1431561273239; Wed, 13 May 2015 16:54:33 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id g20si5611492igt.61.2015.05.13.16.54.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 13 May 2015 16:54:33 -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-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YsgTl-00058r-Iq; Wed, 13 May 2015 23:54:21 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YsgTk-00058g-KV for edk2-devel@lists.sourceforge.net; Wed, 13 May 2015 23:54:20 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.223.179 as permitted sender) client-ip=209.85.223.179; envelope-from=roy.franz@linaro.org; helo=mail-ie0-f179.google.com; Received: from mail-ie0-f179.google.com ([209.85.223.179]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YsgTj-00056T-WF for edk2-devel@lists.sourceforge.net; Wed, 13 May 2015 23:54:20 +0000 Received: by iebgx4 with SMTP id gx4so46750434ieb.0 for ; Wed, 13 May 2015 16:54:14 -0700 (PDT) X-Received: by 10.42.164.7 with SMTP id e7mr11582882icy.70.1431561254767; Wed, 13 May 2015 16:54:14 -0700 (PDT) Received: from rfranz-v430.caveonetworks.com (64.2.3.194.ptr.us.xo.net. [64.2.3.194]) by mx.google.com with ESMTPSA id b8sm15350575ioe.23.2015.05.13.16.54.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2015 16:54:13 -0700 (PDT) From: Roy Franz To: edk2-devel@lists.sourceforge.net, linaro-uefi@lists.linaro.org, feng.tian@intel.com Date: Wed, 13 May 2015 16:53:59 -0700 Message-Id: <1431561241-1411-3-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431561241-1411-1-git-send-email-roy.franz@linaro.org> References: <1431561241-1411-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: 1YsgTj-00056T-WF Subject: [edk2] [RFC 2/4] Treat ASCII 0x7F as backspace for LinuxTerm terminal 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.215.48 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 Linux terminals. Signed-off-by: Roy Franz Contributed-under: TianoCore Contribution Agreement 1.0 --- 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 51492f3..70ec370 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 == LINUXTERMTYPE) { + Key.ScanCode = SCAN_NULL; + Key.UnicodeChar = CHAR_BACKSPACE; + } + else { + Key.ScanCode = SCAN_DELETE; + Key.UnicodeChar = 0; + } } else { Key.ScanCode = SCAN_NULL; Key.UnicodeChar = UnicodeChar;