/*1Example of using setEcho and getChar from pour posix library.23NOTE: You can accomplish basically the same thing as this demo in pure node as explained at45https://stackoverflow.com/questions/5006821/nodejs-how-to-read-keystrokes-from-stdin67*/89const posix = require("..");10posix.setEcho(false);11console.log(12"This is a little terminal that capitalizes whatever you type, as you type it."13);14console.log("Hit ctrl+c or ctrl+d to exit, and of course this is not burning cpu while waiting for input.");15console.log("You can usé utf-8: 😀");1617while (true) {18const t = posix.getChar();19if (t.charCodeAt(0) == 4) break;20process.stdout.write(t.toUpperCase());21}222324