[SeaBIOS] [PATCH v4 2/2] boot: switch default menu key to ESC

Paolo Bonzini pbonzini at redhat.com
Thu Mar 12 18:12:24 CET 2015


On some platforms, F12 may be hard to access; for example, on OS X
machines F9-F12 have been intercepted by the OS for a long time, and
on newer OS X releases function keys are basically gone for good.

Which keys are and are not available depends on the client, not on
the server, but only function keys are usually trapped by terminals.
Hence, using ESC for the boot menu avoids the problems associated
with F12.

Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
 docs/Runtime_config.md | 4 ++--
 src/boot.c             | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/Runtime_config.md b/docs/Runtime_config.md
index bb8ebed..65bd26a 100644
--- a/docs/Runtime_config.md
+++ b/docs/Runtime_config.md
@@ -88,7 +88,7 @@ be displayed.
 
 SeaBIOS will show the image during the wait for the boot menu (if the
 boot menu has been disabled, users will not see the image). The image
-should probably have "Press F12 for boot menu" embedded in it so users
+should probably have "Press ESC for boot menu" embedded in it so users
 know they can enter the normal SeaBIOS boot menu. By default, the boot
 menu prompt (and thus graphical image) is shown for 2.5 seconds. This
 can be customized via a [configuration
@@ -174,7 +174,7 @@ There are several additional configuration options available in the
 | Filename            | Description
 |---------------------|---------------------------------------------------
 | show-boot-menu      | Controls the display of the boot menu. Set to 0 to disable the boot menu.
-| boot-menu-message   | Customize the text boot menu message. Normally, when in text mode SeaBIOS will report the string "\\nPress F12 for boot menu.\\n\\n". This field allows the string to be changed. (This is a string field, and is added as a file containing the raw string.)
+| boot-menu-message   | Customize the text boot menu message. Normally, when in text mode SeaBIOS will report the string "\\nPress ESC for boot menu.\\n\\n". This field allows the string to be changed. (This is a string field, and is added as a file containing the raw string.)
 | boot-menu-key       | Controls which key activates the boot menu. The value stored is the DOS scan code (eg, 0x86 for F12, 0x01 for Esc). If this field is set, be sure to also customize the **boot-menu-message** field above.
 | boot-menu-wait      | Amount of time (in milliseconds) to wait at the boot menu prompt before selecting the default boot.
 | boot-fail-wait      | If no boot devices are found SeaBIOS will reboot after 60 seconds. Set this to the amount of time (in milliseconds) to customize the reboot delay or set to -1 to disable rebooting when no boot devices are found
diff --git a/src/boot.c b/src/boot.c
index 3aab8d4..d6b1fb7 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -459,8 +459,8 @@ interactive_bootmenu(void)
         ;
 
     char *bootmsg = romfile_loadfile("etc/boot-menu-message", NULL);
-    int menukey = romfile_loadint("etc/boot-menu-key", 0x86);
-    printf("%s", bootmsg ?: "\nPress F12 for boot menu.\n\n");
+    int menukey = romfile_loadint("etc/boot-menu-key", 1);
+    printf("%s", bootmsg ?: "\nPress ESC for boot menu.\n\n");
     free(bootmsg);
 
     u32 menutime = romfile_loadint("etc/boot-menu-wait", DEFAULT_BOOTMENU_WAIT);
-- 
2.3.0




More information about the SeaBIOS mailing list