Add a function that returns user input without waiting

Description

I would like to periodically get the user input buffer without having to wait for the user to type something. A similar function that returns input is waitForKey(), which waits and therefore blocks execution until something is entered.

I want to call something like getInput(), which simply returns whatever has been input by the user.

Maybe it could have an optional argument that flushes the buffer so that functions like waitForKey() would not get it, which would default to true.

Assignee

Unassigned

Reporter

JP

Labels

None

Affects versions

None

Fix versions

None

Priority

Major
Configure