BootManager: add support for page down/up/home/end keys

* Page down is the same as the end key, and just selects the last entry
  in the boot menu.
* Likewise, page up is the same as the home key.

Change-Id: Ibaf8559b0f68462834395aaec8fb22554d7a90f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3555
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Axel Dörfler
2020-12-30 13:36:01 +00:00
committed by Adrien Destugues
parent a7375336a6
commit 786f045666
+25
View File
@@ -134,6 +134,10 @@
; Key codes
%assign KEY_DOWN 0x50
%assign KEY_UP 0x48
%assign KEY_PAGE_DOWN 0x51
%assign KEY_PAGE_UP 0x49
%assign KEY_HOME 0x47
%assign KEY_END 0x4f
%assign KEY_RETURN 0x1C
; Modifier key bitmasks
@@ -431,9 +435,19 @@ inputLoop:
cmp ah, KEY_DOWN
je selectNextPartition
cmp ah, KEY_PAGE_DOWN
je selectLastPartition
cmp ah, KEY_END
je selectLastPartition
cmp ah, KEY_UP
je selectPreviousPartition
cmp ah, KEY_PAGE_UP
je selectFirstPartition
cmp ah, KEY_HOME
je selectFirstPartition
cmp ah, KEY_RETURN
jne inputLoop
jmp bootSelectedPartition
@@ -448,6 +462,12 @@ selectNextPartition:
mov [bp + selection], ax
jmp mainLoop
selectLastPartition:
mov ax, [listItemCount]
dec ax
mov [bp + selection], ax
jmp mainLoop
selectPreviousPartition:
mov ax, [bp + selection]
or ax, ax
@@ -458,6 +478,11 @@ selectPreviousPartition:
mov [bp + selection], ax
jmp mainLoop
selectFirstPartition:
xor ax, ax
mov [bp + selection], ax
jmp mainLoop
; ======================= Print the OS list ============================
printMenu: