mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 15:49:23 +00:00
2002-10-28 Yoshinori K. Okuji <okuji@enbug.org>
* grub/asmstub.c (console_translate_key): Deal with KEY_PPAGE and KEY_NPAGE. * stage2/serial.c (serial_translate_key_sequence): Added two new codes for Page Up and Page Down. * stage2/asm.S (translation_table): Added entries for KEY_PPAGE and KEY_NPAGE. * stage2/stage2.c (run_menu): Deal with Page Up and Page Down. Also recognize the right key for the selection of a boot entry. Suggested by Adam Lackorzynski <adam@os.inf.tu-dresden.de>.
This commit is contained in:
1 parent
ca305dc1b1
commit
76deb4cec4
7 files changed
+50
-2
No files matched your search
@@ -1920,6 +1920,8 @@ translation_table:
|
||||
.word KEY_END, 5
|
||||
.word KEY_DC, 4
|
||||
.word KEY_BACKSPACE, 8
|
||||
.word KEY_PPAGE, 7
|
||||
.word KEY_NPAGE, 3
|
||||
.word 0
|
||||
|
||||
/*
|
||||
|
||||
+3
-1
@@ -218,7 +218,9 @@ serial_translate_key_sequence (void)
|
||||
four_code_table[] =
|
||||
{
|
||||
{('1' | ('~' << 8)), 1},
|
||||
{('3' | ('~' << 8)), 4}
|
||||
{('3' | ('~' << 8)), 4},
|
||||
{('5' | ('~' << 8)), 7},
|
||||
{('6' | ('~' << 8)), 3},
|
||||
};
|
||||
|
||||
/* The buffer must start with ``ESC [''. */
|
||||
|
||||
+27
-1
@@ -447,10 +447,36 @@ restart:
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (c == 7)
|
||||
{
|
||||
/* Page Up */
|
||||
first_entry -= 12;
|
||||
if (first_entry < 0)
|
||||
{
|
||||
entryno += first_entry;
|
||||
first_entry = 0;
|
||||
if (entryno < 0)
|
||||
entryno = 0;
|
||||
}
|
||||
print_entries (3, 12, first_entry, entryno, menu_entries);
|
||||
}
|
||||
else if (c == 3)
|
||||
{
|
||||
/* Page Down */
|
||||
first_entry += 12;
|
||||
if (first_entry + entryno + 1 >= num_entries)
|
||||
{
|
||||
first_entry = num_entries - 12;
|
||||
if (first_entry < 0)
|
||||
first_entry = 0;
|
||||
entryno = num_entries - first_entry - 1;
|
||||
}
|
||||
print_entries (3, 12, first_entry, entryno, menu_entries);
|
||||
}
|
||||
|
||||
if (config_entries)
|
||||
{
|
||||
if ((c == '\n') || (c == '\r'))
|
||||
if ((c == '\n') || (c == '\r') || (c == 6))
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user