how to press F1
|
2019-07-03, 00:49
Post: #1
|
|||
|
|||
how to press F1
from here:
http://ipxe.org/cmd/prompt I saw an example: prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE shell... || goto no_shell just to be curious, how to change the key to F1? there's some keycode in that page, F4....F12, but I didn't see keycode for F1 F2 F3 F4, is there any special reason for not defining these four keys? |
|||
2019-07-03, 07:00
Post: #2
|
|||
|
|||
RE: how to press F1
Maybe it doesn't need conversation?
I think building iPXE with DEBUG=bios_console should show you the scancodes. Use GitHub Discussions VRAM bin |
|||
2019-07-03, 11:19
Post: #3
|
|||
|
|||
RE: how to press F1
The values for special keys such as Ctrl-B and F12 are defined in include/ipxe/keys.h within the iPXE source code.
keys.h: http://git.ipxe.org/ipxe.git/blob/HEAD:/...pxe/keys.h ... #define KEY_DC KEY_ANSI ( 3, '~' ) /**< Delete */ 73 #define KEY_PPAGE KEY_ANSI ( 5, '~' ) /**< Page up */ 74 #define KEY_NPAGE KEY_ANSI ( 6, '~' ) /**< Page down */ 75 #define KEY_F5 KEY_ANSI ( 15, '~' ) /**< F5 */ 76 #define KEY_F6 KEY_ANSI ( 17, '~' ) /**< F6 */ 77 #define KEY_F7 KEY_ANSI ( 18, '~' ) /**< F7 */ 78 #define KEY_F8 KEY_ANSI ( 19, '~' ) /**< F8 (for PXE) */ 79 #define KEY_F9 KEY_ANSI ( 20, '~' ) /**< F9 */ 80 #define KEY_F10 KEY_ANSI ( 21, '~' ) /**< F10 */ 81 #define KEY_F11 KEY_ANSI ( 23, '~' ) /**< F11 */ 82 #define KEY_F12 KEY_ANSI ( 24, '~' ) /**< F12 */ 83 84 /* Not in the [KEY_MIN,KEY_MAX] range; terminals seem to send these as 85 * ... only keys from F5 to F12 are defined is F1 not supported ? or not recommend? if it IS supported, you must build it from source and add that parameter to find the keycode? |
|||
2019-07-03, 13:46
Post: #4
|
|||
|
|||
RE: how to press F1
A-Z is not defined either, and they work, again, they might not need special handling, but I have not confirmed.
Use GitHub Discussions VRAM bin |
|||
2019-07-03, 13:56
Post: #5
|
|||
|
|||
RE: how to press F1
a-z is not special key, can be used as is in cmd
as, so need not define prompt -k a this works but you cannot use this: prompt -k f1 I tried my best to find the keycode for F1 but failed. i tried ( 14, '~' ) , since F5 is ( 15, '~' ) , but failed these keys must be something special, there should be some reason. or the programmer just forgot it? |
|||
2019-07-04, 03:03
Post: #6
|
|||
|
|||
RE: how to press F1
finally I setup a vmware machine to build iPXE, with suggested DEBUG=bios_console
then, when I run the command "prompt", and press F1, I got this error: "Unrecognised BIOS scancode 3b" and for F2: "Unrecognised BIOS scancode 3c" and for F3: "Unrecognised BIOS scancode 3d" and for F4: "Unrecognised BIOS scancode 3e" and for F5...F12, no problem. I think 'Unrecognised' means the iPXE programmer forgot to define it , right? tried this: prompt -k 0x3b did not work. |
|||
2019-07-09, 13:18
Post: #7
|
|||
|
|||
RE: how to press F1
(2019-07-04 03:03)cckp Wrote: I think 'Unrecognised' means the iPXE programmer forgot to define it , right? There is a surprising amount of inconsistency in the ANSI escape codes that various terminals will generate for the lower-numbered function keys. For example: try running "cat" in a graphical terminal window, press F1-F12 in turn to see which sequences are generated, then do the same in a text console (i.e. outside of X11). Only F6-F12 can reliably be recognised without needing to define a concept of terminal type. (F5 was erroneously added to the "reliable" list; it shouldn't really be there.) iPXE deliberately defines only the keys that are likely to work almost all of the time. Michael |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)