From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9EDAECAAD2 for ; Fri, 26 Aug 2022 06:42:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A5CDB848BA; Fri, 26 Aug 2022 08:41:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="BCCe+RWD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8FB0A848B5; Fri, 26 Aug 2022 08:41:37 +0200 (CEST) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5E5F5848BC for ; Fri, 26 Aug 2022 08:41:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masahisa.kojima@linaro.org Received: by mail-pj1-x102b.google.com with SMTP id i8-20020a17090a65c800b001fd602afda2so798143pjs.4 for ; Thu, 25 Aug 2022 23:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=nxxHqT3LQmYnOzhmoQJ9it5hG8dE8c8+kpqf94HPN3Y=; b=BCCe+RWDjTdZ30y1oiqIt0RD3Lh1fepDSdx180ojnYdMJRa/QD785kqiGncbsSz4wh EwrAvnNrV5xmNDN+3X6gPX2Gh5fkBVdX3sne2DJsTdia+yiPl0TsejNv28Cjlleqciwb CaP5sgkZ9M8vKju3wGiwfG7AEyBL+3l2YX+f2kWV+vM8yZkL1HGmtZak9XDzhO5xMIKW EC6nBYGvl8qx4/O9TaUe2UJ6cNEPGAwneLAQGaA3eCG1/VqLR9ZNqEuK6EOTSwVvmNUk Kj6Vf94POCams1QU7B88sxDmczd0S1Ir57zszj8D/iea5s/dRBRNkiifrs6CJ+tEfula 0suA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=nxxHqT3LQmYnOzhmoQJ9it5hG8dE8c8+kpqf94HPN3Y=; b=HDzkbRMEefT5liBX33PavO1xbC521rAj8K5Xtecc9wferUiByiUOz/c8uusMFWPeiu HYbRl2UKW/fBFMMdzPurSEMqBTA3uB3QXGSyBN6UkNqaCjpf6BUojIsbmYH981wszR+3 GHa17D+ObA8T7m7eX0+RHmK1LKZW/NjsICu27yFFvkoOcPnQixhd1VFOWdDhoyKXwDl5 77uoPEeoZLOZOK8TKykqzAOHo/Yufrc6cd1DDhEuN4f+bU3Uv5+r+3fDKQ2sA1PRXkKl sQ8JlckfMQGrb/EbsDMb48B6tHOPWAF9Tn538OTNjQPk0iwgYhc+jsma/kMq5pwP9f1P 2k1Q== X-Gm-Message-State: ACgBeo2QhXPy0krhC/gy3k2zeVtAqkQHAjCp53SZW2DDyV4kBjmK+zep FBtDcbhsWLm51qCRAEjmCnlAc3Mf3lrQ9w== X-Google-Smtp-Source: AA6agR7CwNL+30f69f9zjrObY4qfCh2le/NzjBtSCFh3+z7ONytO+pYWa61e1eiSIdE80gMlu4FnlQ== X-Received: by 2002:a17:90a:df02:b0:1fa:ba39:ec49 with SMTP id gp2-20020a17090adf0200b001faba39ec49mr2837341pjb.129.1661496088970; Thu, 25 Aug 2022 23:41:28 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id f8-20020a170902ce8800b0016d62ba5665sm694641plg.254.2022.08.25.23.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 23:41:28 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Mark Kettenis , Masahisa Kojima Subject: [PATCH v14 03/10] menu: add KEY_PLUS, KEY_MINUS and KEY_SPACE handling Date: Fri, 26 Aug 2022 15:42:16 +0900 Message-Id: <20220826064223.23288-4-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220826064223.23288-1-masahisa.kojima@linaro.org> References: <20220826064223.23288-1-masahisa.kojima@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This is preparation to support menu-driven UEFI BootOrder variable updated by KEY_PLUS, KEY_MINUS and KEY_SPACE. Signed-off-by: Masahisa Kojima Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- No update since v11 Changes in v11: - add SPACE key handling Newly created in v7 common/menu.c | 9 +++++++++ include/menu.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/common/menu.c b/common/menu.c index 3e876b55b3..0d19601cf5 100644 --- a/common/menu.c +++ b/common/menu.c @@ -548,4 +548,13 @@ void bootmenu_loop(struct bootmenu_data *menu, /* ^C was pressed */ if (c == 0x3) *key = KEY_QUIT; + + if (c == '+') + *key = KEY_PLUS; + + if (c == '-') + *key = KEY_MINUS; + + if (c == ' ') + *key = KEY_SPACE; } diff --git a/include/menu.h b/include/menu.h index e74616cae8..702aacb170 100644 --- a/include/menu.h +++ b/include/menu.h @@ -48,6 +48,9 @@ enum bootmenu_key { KEY_DOWN, KEY_SELECT, KEY_QUIT, + KEY_PLUS, + KEY_MINUS, + KEY_SPACE, }; void bootmenu_autoboot_loop(struct bootmenu_data *menu, -- 2.17.1