If a console (non-GUI) program is running in a shell window on e.g. KDE on Linux (e.g. Debian 12), does it have any chance of recovering the scancode when e.g. the <F1> key is pressed?
The documentation for ReadKey() says that
If an extended or function key has been pressed, then the zero ASCII code is returned. You can then read the scan code of the key with a second ReadKey call.
but I suspect that this might only apply to the system console, or that it requires the keyboard to be set to raw mode which the Crt overview explicitly says is a problem.
Application is a Telnet client with comprehensive hooks for Telnet options and NVT controls. However I'd emphasise that this is test code and not at all important: I'm asking more for curiosity than anything else.
MarkMLl