From patchwork Tue Jul 25 10:25:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 706138 Delivered-To: patch@linaro.org Received: by 2002:a5d:464f:0:b0:317:2194:b2bc with SMTP id j15csp98917wrs; Tue, 25 Jul 2023 03:26:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlF8qAxlqzgPSAXTw9TOdH4z4PXLqQ0f6f5t3+K8OG5UcZFDKl1ArIhfs89Aj47dxL0zPjCb X-Received: by 2002:a05:620a:a4a:b0:767:2076:5bee with SMTP id j10-20020a05620a0a4a00b0076720765beemr2376460qka.9.1690280816137; Tue, 25 Jul 2023 03:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690280816; cv=none; d=google.com; s=arc-20160816; b=FHhbawXfx/EgY/BSwqWorDeHegTRj363oKZ/SAXVnSbg9lv3siGhWOA+S0GVr5U5Gp F6eH9cLf/DhKGr+XCZ7fshnu3P+mEXk/3+ePxLHR8ik+8ESI+0gMvDm0mvuHvChNiiz2 dL25VHc0CuSSJmLR3RhIK+Cb4lD7XQk7Z/K41m69ECjINu70ljJcpUIgeqLLoM0pDT5X AHHOHXrlW1xWtWLYOWhsXCW4vhFsHnhCtX1+S5vprb9H4Kj4DjSt7dzuaaJiPUYREgMF lVnf5iC64Gt9d4igQIvE2DpjILcwYeOTyy0HK7gmoGD5jm4T9hMxGl49uC3PXxwEqP1R 8lCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=LicjyZN3b/YUo5rE9Rcv6mrB/LPasqs2dSTgyc7oBvU=; fh=bFDrUYhlTVi/QyetgXx/byg2+yO/22Hp9SjwoefyKLk=; b=RsUjH1YK0DNlTq0J2Muedqbejyj7LSOheraEQOsQgVPdKXZfkE5Yhm4eBQNtm55uKW irRMoS6+g/GQrBmd/E8nMaxCxcNGShsY9YmP+xLMq86AVQniWOlcjmwqyiUx7/ZELs2u jlYuCZ31tfTK6Moj8LWnbqzTKYito4YSngFIiycsap9y4ipoQ2LVP0A5yFH8cI1vCviN MXMbP9TZHwAiZGe4sJAgRZWxoGmmTzQzRcJ5Xnmm5YFuSrKl8h7ehEkwYqG8IU7owYz1 ec9d3VHR54fxpTyj2h2y7IT3gzfe31BlIb86D9hRn9bwtJjcNpExAsdJA7CParRPuVsr 17+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="JgA3qk/R"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s125-20020a372c83000000b00767e5d15d79si6160375qkh.34.2023.07.25.03.26.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Jul 2023 03:26:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="JgA3qk/R"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOFFD-0001Ut-NL; Tue, 25 Jul 2023 06:26:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOFE8-0000IK-8k for qemu-devel@nongnu.org; Tue, 25 Jul 2023 06:25:13 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOFE5-0007Vp-Mh for qemu-devel@nongnu.org; Tue, 25 Jul 2023 06:25:11 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fc04692e20so52686205e9.0 for ; Tue, 25 Jul 2023 03:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690280707; x=1690885507; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LicjyZN3b/YUo5rE9Rcv6mrB/LPasqs2dSTgyc7oBvU=; b=JgA3qk/RdInWcQKiQ0PPOOOrSkEaeSLJBucMWy7/HIn+Y001VkNGy9sk3qnojVFypD 7QE/SqE6zlGUBgvCumB6ozGVAseucr4Dat82QHPjGInn7A+Do4exeOHn67x1B9Xwo2qs DuTIk+Vd4tqQz+FjLBNgIPO9i4uTNIQ1wfcO/woVQR/vWmkoYJaoTdNL9wc862wYcSoU cbEkUlpPZmnH7HCYJE9G3xbx9RTOsXRE51oGvPmmw7fZkzZboq6wd7xut3eO9YtQFUoD Zc5Q7wapBM8Z56y/dXMu2LpXlvnONc9tU9Vp7FVTYR5DWZICyFWIE0hNK8fW+3zhKiPU 5ajg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690280707; x=1690885507; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LicjyZN3b/YUo5rE9Rcv6mrB/LPasqs2dSTgyc7oBvU=; b=MVyDlEK89ktJ5x9o26htlsRkNfz7gh0K+2D9aZNHbZ7XqW2UMEhvver8KqTbvb1oC7 6vPjZxwrDMEcV8QwwzJBHWXyE4uOCquR7Z/iRmssdkHwc6M9++yQ2+NaWr5vuUWJtRmC MB6dLtowuuHfiqAWuDGKOZ41Q74P/uRoLiVLbkStTwizx5C+0MYBKuiyuQfgxGtEIxXa UBac25QvchTpgXZd/YJydSlNCOUwFArFAqKX6hCQUFPk0CjGUPNrsZSGEwQaAOV7nL5K u0XApK3wTKo7dzbAJdlp6wB27aM3FkQTTCPPDHs/4KhYyQW/SFc0FcXOUrliiSFriHq4 APrQ== X-Gm-Message-State: ABy/qLYPWzNKasjJ9qixQPIX3rwjEGJuatnU+W4NJLrReVbdPIUofZIp YeDL4UQaIABUY4675D9vCeVksn/Wn0+5/BsUTc8= X-Received: by 2002:a1c:6a13:0:b0:3fb:b3aa:1c8a with SMTP id f19-20020a1c6a13000000b003fbb3aa1c8amr9888741wmc.16.1690280706906; Tue, 25 Jul 2023 03:25:06 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id u19-20020a05600c211300b003fbc30825fbsm12567185wml.39.2023.07.25.03.25.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 03:25:06 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 4/5] For curses display, recognize a few more control keys Date: Tue, 25 Jul 2023 11:25:02 +0100 Message-Id: <20230725102503.2283907-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230725102503.2283907-1-peter.maydell@linaro.org> References: <20230725102503.2283907-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Sean Estabrooks The curses display handles most control-X keys, and translates them into their corresponding keycode. Here we recognize a few that are missing, Ctrl-@ (null), Ctrl-\ (backslash), Ctrl-] (right bracket), Ctrl-^ (caret), Ctrl-_ (underscore). Signed-off-by: Sean Estabrooks Message-id: CAHyVn3Bh9CRgDuOmf7G7Ngwamu8d4cVozAcB2i4ymnnggBXNmg@mail.gmail.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- ui/curses_keys.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/curses_keys.h b/ui/curses_keys.h index 71e04acdc75..88a2208ed18 100644 --- a/ui/curses_keys.h +++ b/ui/curses_keys.h @@ -210,6 +210,12 @@ static const int _curses2keycode[CURSES_CHARS] = { ['N' - '@'] = 49 | CNTRL, /* Control + n */ /* Control + m collides with the keycode for Enter */ + ['@' - '@'] = 3 | CNTRL, /* Control + @ */ + /* Control + [ collides with the keycode for Escape */ + ['\\' - '@'] = 43 | CNTRL, /* Control + Backslash */ + [']' - '@'] = 27 | CNTRL, /* Control + ] */ + ['^' - '@'] = 7 | CNTRL, /* Control + ^ */ + ['_' - '@'] = 12 | CNTRL, /* Control + Underscore */ }; static const int _curseskey2keycode[CURSES_KEYS] = {