From patchwork Mon Jul 6 23:04:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 50796 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AFA0E229FC for ; Mon, 6 Jul 2015 23:05:17 +0000 (UTC) Received: by wguu7 with SMTP id u7sf54807934wgu.0 for ; Mon, 06 Jul 2015 16:05:17 -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=S5polumPPeuF7Qj0al1ftmaDHBnF0Se1QhczRrZ/wBU=; b=myNF7ziQuT7ZIMkC543QJsRVTdeFK5Tc76r1bjhIfeLim02zU+hLhJdahcOzBTZCfO 8wLVxfYZWhsqGtPvF64Tl/Mnkj7CwBCDFnAJuOynvzHUKJYMd/v28Pk9RmysukAjC5aS c8/mkWxQbX7LssDlKLmgq78JUktl4IAvoCCV13W2YXpacph046NALC7dztHEZ/enh51r ltdwLv84m0agqPOfRYwOO64LMpmyUrcA9YFswawYB97Y6aOUHctdvrvsFFgHLqzP6bsl O/jVW4WJ4FPaidkHe4cEnu1gLySC8ZtFgDtcCx8C4LNmW9nR1ZheQ9TErvgpao/4jxlM DnRA== X-Gm-Message-State: ALoCoQlxscHs9QM8OeVV/w0joZQPPPmgIFYXeumHn5qGopbMhVE+R6e6JfWD5CJEIi2wyRnapv3k X-Received: by 10.112.189.131 with SMTP id gi3mr591965lbc.6.1436223917008; Mon, 06 Jul 2015 16:05:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.39 with SMTP id p7ls218956lap.104.gmail; Mon, 06 Jul 2015 16:05:16 -0700 (PDT) X-Received: by 10.152.198.135 with SMTP id jc7mr1175049lac.48.1436223916683; Mon, 06 Jul 2015 16:05:16 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id yk6si16481383lbb.90.2015.07.06.16.05.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 16:05:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lagx9 with SMTP id x9so173784016lag.1 for ; Mon, 06 Jul 2015 16:05:16 -0700 (PDT) X-Received: by 10.152.26.163 with SMTP id m3mr1169388lag.86.1436223916350; Mon, 06 Jul 2015 16:05:16 -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 hn6csp2009563lbb; Mon, 6 Jul 2015 16:05:15 -0700 (PDT) X-Received: by 10.50.93.69 with SMTP id cs5mr75472276igb.4.1436223914781; Mon, 06 Jul 2015 16:05:14 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id lq3si6577989igb.3.2015.07.06.16.05.14 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 06 Jul 2015 16:05:14 -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 1ZCFRh-0000zw-CC; Mon, 06 Jul 2015 23:05:05 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZCFRg-0000za-C9 for edk2-devel@lists.sourceforge.net; Mon, 06 Jul 2015 23:05:04 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.220.49 as permitted sender) client-ip=209.85.220.49; envelope-from=roy.franz@linaro.org; helo=mail-pa0-f49.google.com; Received: from mail-pa0-f49.google.com ([209.85.220.49]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1ZCFRe-0003KO-Hv for edk2-devel@lists.sourceforge.net; Mon, 06 Jul 2015 23:05:04 +0000 Received: by pacws9 with SMTP id ws9so103627339pac.0 for ; Mon, 06 Jul 2015 16:04:57 -0700 (PDT) X-Received: by 10.70.48.68 with SMTP id j4mr2212160pdn.111.1436223896965; Mon, 06 Jul 2015 16:04:56 -0700 (PDT) Received: from localhost.localdomain (c-73-41-93-56.hsd1.ca.comcast.net. [73.41.93.56]) by mx.google.com with ESMTPSA id m2sm19544337pdp.4.2015.07.06.16.04.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jul 2015 16:04:55 -0700 (PDT) From: Roy Franz To: edk2-devel@lists.sourceforge.net, feng.tian@intel.com, lersek@redhat.com, ard.biesheuvel@linaro.org Date: Mon, 6 Jul 2015 16:04:37 -0700 Message-Id: <1436223879-27956-3-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436223879-27956-1-git-send-email-roy.franz@linaro.org> References: <1436223879-27956-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: 1ZCFRe-0003KO-Hv Subject: [edk2] [PATCH V2 2/4] 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.215.47 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. Signed-off-by: Roy Franz Contributed-under: TianoCore Contribution Agreement 1.0 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;