lockInput method
void
lockInput()
Implementation
void lockInput() {
if (!io.stdin.hasTerminal) return;
try {
io.stdin.echoMode = false;
io.stdin.lineMode = false;
// hide cursor
io.stdout.write('\x1B[?25l');
} on io.StdinException {
// Pseudo-TTYs / redirected stdin can report hasTerminal=true but still
// reject mode changes (e.g. errno 19). Continue without raw input.
}
}