Hi Paolo,
Sorry for the delay in responding.
On Thu, Mar 05, 2015 at 10:13:30AM +0100, Paolo Bonzini wrote:
On 04/03/2015 22:42, Kevin O'Connor wrote:
On Wed, Mar 04, 2015 at 05:57:02PM +0100, Paolo Bonzini wrote:
F11 and F12 are trapped by some terminal emulators, and sgabios does not always recognize function keys very well.
Real-world machines often provide replacements for function keys for use on the serial console: ESC+1...ESC+0 for F1...F10, ESC+SHIFT+1 and ESC+SHIFT+2 for F11...F12. Accept all of them, which can be useful in case the user has set boot-menu-key.
Thanks. Did you encounter this problem with QEMU or on a real machine with coreboot?
With QEMU.
Out of curiosity, is there a reason why one can't modify boot-menu-key/boot-menu-message for those machines that don't support F12?
The trivial reason is that right now, QEMU doesn't support customizing the menu key and message (also there are several management layers between QEMU and the user, such as libvirt/oVirt/OpenStack, and you'd have to add support in all of them).
But more important, which keys are and are not available depends on the client, not on the server. So for VNC all keys work but on at least a viewer F8 is inconvenient because it brings up a menu (thankfully one item in the menu is "Send F8"); for the serial console on a Unix machine F12 is okay but F11 might bring the terminal full screen; on older Mac OS X machine F9-F12 were intercepted by the OS, but on newer OS X releases function keys are basically gone for good. A configuration that always works might be broken by the addition of a new client.
The above makes sense. The F12 key comes from Bochs bios. Given the difficulties in using F-keys (on QEMU as well as on real machines) I wonder if we should just change the SeaBIOS default to ESC?
I don't like changing the default message to "Press ESC+@ or F12 for boot menu." as I think the description becomes confusing when multiple options are given. So, ESC+@ could be a hidden feature, but admittedly that's not a great option. Otherwise the technical parts of the patch looks okay to me.
-Kevin