Skip to content
Snippets Groups Projects
Commit bec4667e authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Optionally distinguish between timeout and NUL inkey() result

Some terminals can send NUL (ASCII 0), e.g. hitting Ctrl-Space in Apple iTerm. Allow users of inkey() (in C++ or JS) to optionally detect the difference by specifying the K_NUL mode flag. In JS, console.inkey() will return null upon timeout (rather than "") when the K_NUL mode flag is used and return an empty string ("") upon receipt of NUL (ASCII 0).

The default is the previous behavior where a timeout and the receipt of a NUL character appear the same to the caller of inkey().
parent 9439f5b8
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment