From patchwork Fri Jan 30 03:58:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1783 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org Authentication-Results: mail.u-boot.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=VfZ8Tb/2; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AF083697DF for ; Thu, 29 Jan 2026 20:59:29 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 08_lZT5kYnaD for ; Thu, 29 Jan 2026 20:59:29 -0700 (MST) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9D71D697CE for ; Thu, 29 Jan 2026 20:59:29 -0700 (MST) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AAED1697CE for ; Thu, 29 Jan 2026 20:59:27 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id CNTE7G1czRYv for ; Thu, 29 Jan 2026 20:59:27 -0700 (MST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.161.45; helo=mail-oo1-f45.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-oo1-f45.google.com (mail-oo1-f45.google.com [209.85.161.45]) by mail.u-boot.org (Postfix) with ESMTPS id 24E1F697DF for ; Thu, 29 Jan 2026 20:59:24 -0700 (MST) Received: by mail-oo1-f45.google.com with SMTP id 006d021491bc7-6611c3b147eso1183340eaf.2 for ; Thu, 29 Jan 2026 19:59:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1769745563; x=1770350363; darn=u-boot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w5OSh5hW9Cwx6k20XkkhCxPYmJFfl//uXcV+Ve37Q+Y=; b=VfZ8Tb/2ccokrkWk1Y+yx/75+xFxuCylVPv9et9TQxLJtUeINpa09WkfBQGlGFC1er WceApLjByWd7iJ9VGKkM+ACP5zQHM9+f0c0LVP6woLGwNI9pfgqxC5seYaNU3UPWbh9X DoxaGxr0NVBSbvkCG27wDgopcoMvKKrwzMlw4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769745563; x=1770350363; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=w5OSh5hW9Cwx6k20XkkhCxPYmJFfl//uXcV+Ve37Q+Y=; b=khWeXx8v4fWMlE/srhKzjmkGwlhQmP2s3aAQNSizMs6P7ng1s+LIbEqoPpY2Qq9CJX 7s91g/Xbk1T82/IcLqVdXLCRM1fdXD4OxTlquNubFDv3AgkrV/GrYxia7wfT4k7G0I28 xgsDwZbaTODUApCm9/zeiuKjek50L0NH5PRKXsXubjpRlKixLYPIn70BmY7bBsgLEIYP 2tZ43e5hSKIrqKchnkSgNs/TQOTS+Rv8zMoEsGIIuXA4b3ry0cTSsXC3paaHwRb6vsz9 evCuCp1weGt+tWx8dT6by2XSwbHzTvALZ1E3OFfyLNwY+6uWTeowCx+j3R/2F/FoPuwl fHmA== X-Gm-Message-State: AOJu0Yym8qgstJTrCKmeq7T2NU5dZrXHRU4Yg36Z/KKdmWF0j5ZrlbwC izjDiCOddS0rMIn5/c3+bD4+NqAUCGv4CsW5445in2lc+khTYs+37wB+OiyZdsPyFDMzo/Uiqz0 w2gkOdw== X-Gm-Gg: AZuq6aIzQUoFXZWfLZVl7KX/9yWNZi4Vap5tNLkKEvNk5Vlu0dPyNHOuaFwUGKwn/nc kUea6V2sFUy5TLmggziXk1ICPe7Eurz0DCWZLPm9wp35tZD1KGduIJC4sS9SWjwkO1dsnpYOawO SaAl++eN0kdbsPtaZP2NzXJqfIpyr53+iH6m9RrFLUuqJmtee1ctD7w9mVqVluxN9FYlnKDIpaW FngwmZuzhhBuRe9x28fXbxK/tVT6r0CNnG6ULrDn0HqERCaU0gY/9P91bokorEyYFQpSYtxZ4km JaK8dR/Ria2v3Zv1dj3mdc7etU0XdBDstWCqO/CTNff7AfsteNVcAlmtv50WQLTSAwebqSSpuVH NG1/XsXAjM60SbL9+24S4jxVJESmgWCDwVk5WvBtweD8IWEAmQ4ugubNL1QEClL2ldMDT/EJA94 desn/Fi49M1toMRjVd X-Received: by 2002:a05:6820:62a:b0:662:e066:7394 with SMTP id 006d021491bc7-6630f3a9a01mr814298eaf.73.1769745562817; Thu, 29 Jan 2026 19:59:22 -0800 (PST) Received: from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-662f9a4e491sm4128687eaf.16.2026.01.29.19.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 19:59:21 -0800 (PST) From: Simon Glass X-Google-Original-From: Simon Glass To: U-Boot Concept Date: Thu, 29 Jan 2026 20:58:32 -0700 Message-ID: <20260130035849.3580212-10-simon.glass@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260130035849.3580212-1-simon.glass@canonical.com> References: <20260130035849.3580212-1-simon.glass@canonical.com> MIME-Version: 1.0 Message-ID-Hash: QGS2PEGBQWFWO2363J75A7KYQ42P4WRT X-Message-ID-Hash: QGS2PEGBQWFWO2363J75A7KYQ42P4WRT X-MailFrom: sjg@chromium.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 09/19] input: Add Home and End key support for sandbox SDL console List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add KEY_HOME and KEY_END to the ANSI escape sequence table so that these keys work in the sandbox SDL console. They generate the escape sequences ESC [ H and ESC [ F respectively, which are then decoded by cli_getch.c to move the cursor to the beginning or end of the line. Also add these keys (plus KEY_DELETE) to the sandbox cros-ec keyboard matrix so they are recognized by the emulated keyboard controller. There are no tests for this feature. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- arch/sandbox/dts/cros-ec-keyboard.dtsi | 4 ++++ drivers/input/input.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/arch/sandbox/dts/cros-ec-keyboard.dtsi b/arch/sandbox/dts/cros-ec-keyboard.dtsi index d885a5ecd22..a8a2c790b9a 100644 --- a/arch/sandbox/dts/cros-ec-keyboard.dtsi +++ b/arch/sandbox/dts/cros-ec-keyboard.dtsi @@ -110,6 +110,10 @@ MATRIX_KEY(0x07, 0x09, KEY_O) MATRIX_KEY(0x07, 0x0b, KEY_UP) MATRIX_KEY(0x07, 0x0c, KEY_LEFT) + + MATRIX_KEY(0x00, 0x07, KEY_HOME) + MATRIX_KEY(0x00, 0x09, KEY_END) + MATRIX_KEY(0x00, 0x0b, KEY_DELETE) >; }; }; diff --git a/drivers/input/input.c b/drivers/input/input.c index 5206d6f68d6..5d265837a25 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -188,6 +188,9 @@ static struct { { KEY_LEFT, "[D"}, { KEY_RIGHT, "[C"}, { KEY_DOWN, "[B"}, + { KEY_HOME, "[H"}, + { KEY_END, "[F"}, + { KEY_DELETE, "[3~"}, { KEY_F1, "OP"}, { KEY_F2, "OQ"}, { KEY_F3, "OR"},