All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahisa Kojima <masahisa.kojima@linaro.org>
To: u-boot@lists.denx.de
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Glass <sjg@chromium.org>,
	Takahiro Akashi <takahiro.akashi@linaro.org>,
	Mark Kettenis <mark.kettenis@xs4all.nl>,
	Masahisa Kojima <masahisa.kojima@linaro.org>
Subject: [PATCH v16 03/10] menu: add KEY_PLUS, KEY_MINUS and KEY_SPACE handling
Date: Mon,  5 Sep 2022 21:47:55 +0900	[thread overview]
Message-ID: <20220905124803.2909-4-masahisa.kojima@linaro.org> (raw)
In-Reply-To: <20220905124803.2909-1-masahisa.kojima@linaro.org>

This is preparation to support menu-driven UEFI BootOrder
variable updated by KEY_PLUS, KEY_MINUS and KEY_SPACE.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
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


  parent reply	other threads:[~2022-09-05 12:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 12:47 [PATCH v16 00/10] enable menu-driven UEFI variable maintenance Masahisa Kojima
2022-09-05 12:47 ` [PATCH v16 01/10] eficonfig: menu-driven addition of UEFI boot option Masahisa Kojima
2022-09-05 12:47 ` [PATCH v16 02/10] eficonfig: add "Edit Boot Option" menu entry Masahisa Kojima
2022-09-05 12:47 ` Masahisa Kojima [this message]
2022-09-05 12:47 ` [PATCH v16 04/10] eficonfig: add "Delete " Masahisa Kojima
2022-09-05 12:47 ` [PATCH v16 05/10] bootmenu: add removable media entries Masahisa Kojima
2022-09-05 12:47 ` [PATCH v16 06/10] eficonfig: scan media device in eficonfig startup Masahisa Kojima
2022-09-05 12:47 ` [PATCH v16 07/10] eficonfig: add "Change Boot Order" menu entry Masahisa Kojima
2022-09-05 12:48 ` [PATCH v16 08/10] doc:bootmenu: add description for UEFI boot support Masahisa Kojima
2022-09-05 12:48 ` [PATCH v16 09/10] doc:eficonfig: add documentation for eficonfig command Masahisa Kojima
2022-09-05 12:48 ` [PATCH v16 10/10] test: unit test for eficonfig Masahisa Kojima
2022-09-05 15:55   ` Heinrich Schuchardt
2022-09-06  1:30     ` Takahiro Akashi
2022-09-06  6:59       ` Masahisa Kojima

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220905124803.2909-4-masahisa.kojima@linaro.org \
    --to=masahisa.kojima@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=sjg@chromium.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.