Repository
Current version released
4 years ago
Dependencies
std
Deno keypress reader
Reads key from stdin.
Try
deno run --unstable test.ts
Usage
import {readKeypress} from "./mod.ts";
while (true) {
const events = await readKeypress();
events.forEach(event => {
console.log(event);
if (event.ctrlKey && event.key === 'c') {
Deno.exit(0);
}
})
}