Matt Delco has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32256 )
Change subject: libpayload: keyboard: Add F11 and F12 support ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/32256/1/payloads/libpayload/drivers/i8042/ke... File payloads/libpayload/drivers/i8042/keyboard.c:
https://review.coreboot.org/#/c/32256/1/payloads/libpayload/drivers/i8042/ke... PS1, Line 61: KEY_F(11), : KEY_F(12)
Why not add it directly behind `KEY_F(10)`.
The original IBM keyboard only had F1-F10, so in PS/2 scancode the positions after KEY_F(10) are for num lock and scroll lock (example ps/2 doc cited in an earlier comment). When F11 and F12 were added they added it at the end of the codes. I looked through the zeros. Most are undefined (apparently the 10-key is stuck in non-numeric mode, so '5' has no meaning) or for modifier keys (shift, alt, ctrl). Potential keys that could be populated is for offset 0x4a (minus) and 0x4E (plus). To me it seems backwards that the page down key is mapped to KEY_PPAGE and page up key mapped to KEY_NPAGE, but the rest of the code seems to be backwards to cope (often with explanatory comments).