From 76f5e60d25a0c4768bc6c3d5fb1344def1c0dcdc Mon Sep 17 00:00:00 2001 From: srs5694 Date: Thu, 9 Feb 2017 10:13:42 -0500 Subject: [PATCH] Added new keyboard mappings: Tab is equivalent of Inset/F2 and Backspace (Delete on Mac keyboards) is equivalent of Esc. This is done for new Mac laptops that lack some keys. --- Makefile | 2 +- debian/copyright | 6 +++--- docs/refind/using.html | 10 +++++----- refind/lib.c | 2 +- refind/main.c | 4 ++-- refind/menu.c | 7 ++++++- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 2ae341a..d894fbc 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ MOK_DIR=mok GPTSYNC_DIR=gptsync EFILIB_DIR=EfiLib export EDK2BASE=/usr/local/UDK2014/MyWorkSpace -export REFIND_VERSION='L"0.10.4"' +export REFIND_VERSION='L"0.10.4.2"' # The "all" target builds with the TianoCore library if possible, but falls # back on the more easily-installed GNU-EFI library if TianoCore isn't diff --git a/debian/copyright b/debian/copyright index 7247a08..ea74f77 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,7 +5,7 @@ Source: http://www.rodsbooks.com/refind Files: * Copyright: 2006 Christoph Pfisterer - 2012-2016 Roderick W. Smith + 2012-2017 Roderick W. Smith License: BSD-3-clause and GPL-3+ Files: debian/* @@ -56,7 +56,7 @@ Files: refind/* libeg/image.c libeg/screen.c Copyright: 2006-2010 Christoph Pfisterer - 2012-2016 Roderick W. Smith + 2012-2017 Roderick W. Smith License: BSD-3-clause and GPL-3+ Files: refind/icns.c @@ -410,7 +410,7 @@ Comment: PNG bitmap derived from TrueType font Files: docs/* */README* -Copyright: 2012-2016 Roderick W. Smith +Copyright: 2012-2017 Roderick W. Smith License: GFDL-1.3 License: BSD-2-clause diff --git a/docs/refind/using.html b/docs/refind/using.html index 908abee..5101d8b 100644 --- a/docs/refind/using.html +++ b/docs/refind/using.html @@ -196,7 +196,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

-

Ordinarily, rEFInd displays tags for OSes it finds on internal hard disks, external hard disks (including USB flash drives, CF disks, and so on), and optical discs. Sometimes, though, the firmware hasn't had time to fully examine these devices by the time rEFInd starts; or you might only insert or plug in the media after rEFInd appears. In these cases, you can press the Esc key to have rEFInd re-read its configuration file and re-scan your media for boot loaders. This action can take a few seconds to complete, so be patient. You can also use this feature to detect OSes if you launch a shell and use it to load a driver or edit the refind.conf file. If you regularly need to press Esc, you might look into the scan_delay configuration file option, described on the Configuring the Boot Manager page.

+

Ordinarily, rEFInd displays tags for OSes it finds on internal hard disks, external hard disks (including USB flash drives, CF disks, and so on), and optical discs. Sometimes, though, the firmware hasn't had time to fully examine these devices by the time rEFInd starts; or you might only insert or plug in the media after rEFInd appears. In these cases, you can press the Esc or Backspace (Delete on Macs) key to have rEFInd re-read its configuration file and re-scan your media for boot loaders. This action can take a few seconds to complete, so be patient. You can also use this feature to detect OSes if you launch a shell and use it to load a driver or edit the refind.conf file. If you regularly need to press Esc/Backspace, you might look into the scan_delay configuration file option, described on the Configuring the Boot Manager page.

On some computers, the firmware doesn't mount external USB media unless you adjust a firmware option or use the EFI's own boot manager prior to launching rEFInd. If you don't see external media appear in rEFInd's list, consult your computer's manual or examine its firmware to locate a relevant option. This option is often called fast boot or something similar; when enabled, the computer doesn't activate most USB devices because doing so takes a second or two.

@@ -204,13 +204,13 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Adjusting Boot Options

-

If you press the Insert, F2, or + key, rEFInd will show a menu that may hold additional options, depending on the OS type. (OS X and Linux are most likely to hold interesting options on their submenus.) The following figure shows the submenu for Mac OS X. You can use this menu much like the main menu; move the cursor to select the option you want to use, then press the Enter key to launch the boot loader with the selected options. Press the Esc key or select Return to Main Menu to return to the main menu. (See the Methods of Booting Linux page for information on what you might see on a Linux submenu page.)

+

If you press the Insert, F2, Tab, or + key, rEFInd will show a menu that may hold additional options, depending on the OS type. (OS X and Linux are most likely to hold interesting options on their submenus.) The following figure shows the submenu for Mac OS X. You can use this menu much like the main menu; move the cursor to select the option you want to use, then press the Enter key to launch the boot loader with the selected options. Press the Esc or Backspace (Delete on Macs) key or select Return to Main Menu to return to the main menu. (See the Methods of Booting Linux page for information on what you might see on a Linux submenu page.)


rEFInd submenus enable you to set session-specific
     options.

-

From the options submenu, you can press the Insert, F2, or + key again to edit your boot loader options. You're most likely to want to do this when booting Linux via its EFI stub loader, since you can then enter arbitrary kernel options. A simple text-mode line editor opens (shown below), enabling you to move a cursor back and forth in the line with your arrow keys, delete text, and type in new text. If you want to boot with your edited options, press the Enter key. If you decide you picked the wrong entry, press the Esc key. Note that long option lists, as shown in the figure, scroll off the edge of the screen. Moving the cursor past the screen edge scrolls the entire line of text.

+

From the options submenu, you can press the Insert, F2, Tab, or + key again to edit your boot loader options. You're most likely to want to do this when booting Linux via its EFI stub loader, since you can then enter arbitrary kernel options. A simple text-mode line editor opens (shown below), enabling you to move a cursor back and forth in the line with your arrow keys, delete text, and type in new text. If you want to boot with your edited options, press the Enter key. If you decide you picked the wrong entry, press the Esc or Backspace key. Note that long option lists, as shown in the figure, scroll off the edge of the screen. Moving the cursor past the screen edge scrolls the entire line of text.


You can edit options passed to the boot loader on a
@@ -263,11 +263,11 @@ href=rodsmith@rodsbooks.com

Moves the selection to the last item on the utilities row - Esc + Esc or Backspace (Delete on Mac keyboards) Returns from a sub-menu; on the main screen, re-reads the configuration file and re-scans for boot loaders - Insert, F2, or + + Insert, F2, Tab, or + From the main menu, opens the selection's submenu, which is most useful with Mac OS X, ELILO, and Linux kernels with EFI stub loader support; in a submenu, opens a line editor enabling editing of boot options diff --git a/refind/lib.c b/refind/lib.c index c60615b..b00985a 100644 --- a/refind/lib.c +++ b/refind/lib.c @@ -34,7 +34,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Modifications copyright (c) 2012-2015 Roderick W. Smith + * Modifications copyright (c) 2012-2017 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), or (at your option) any later version. diff --git a/refind/main.c b/refind/main.c index 6660117..d183e83 100644 --- a/refind/main.c +++ b/refind/main.c @@ -34,7 +34,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Modifications copyright (c) 2012-2016 Roderick W. Smith + * Modifications copyright (c) 2012-2017 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), or (at your option) any later version. @@ -157,7 +157,7 @@ static REFIT_MENU_ENTRY MenuEntryRotateCsr = { L"Change SIP Policy", TAG_CSR_ROT REFIT_MENU_SCREEN MainMenu = { L"Main Menu", NULL, 0, NULL, 0, NULL, 0, L"Automatic boot", L"Use arrow keys to move cursor; Enter to boot;", - L"Insert or F2 for more options; Esc to refresh" }; + L"Insert, Tab, or F2 for more options; Esc or Backspace to refresh" }; static REFIT_MENU_SCREEN AboutMenu = { L"About", NULL, 0, NULL, 0, NULL, 0, NULL, L"Press Enter to return to main menu", L"" }; REFIT_CONFIG GlobalConfig = { FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, 0, 0, 0, DONT_CHANGE_TEXT_MODE, diff --git a/refind/menu.c b/refind/menu.c index 4719228..08abe3e 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -34,7 +34,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Modifications copyright (c) 2012-2015 Roderick W. Smith + * Modifications copyright (c) 2012-2017 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), or (at your option) any later version. @@ -600,7 +600,11 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty case ' ': MenuExit = MENU_EXIT_ENTER; break; + case CHAR_BACKSPACE: + MenuExit = MENU_EXIT_ESCAPE; + break; case '+': + case CHAR_TAB: MenuExit = MENU_EXIT_DETAILS; break; default: @@ -618,6 +622,7 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty UINT32 TouchScreenPosX = (TouchState.CurrentX * UGAWidth) / TouchProtocol->Mode->AbsoluteMaxX; UINT32 TouchScreenPosY = (TouchState.CurrentY * UGAHeight) / TouchProtocol->Mode->AbsoluteMaxY; + UINTN Item = FindMainMenuItem(Screen, &State, TouchScreenPosX, TouchScreenPosY); switch (Item) { case TOUCH_NO_ITEM: -- 2.39.2