Skip to main content
Deno 2 is finally here 🎉️
Learn more

Clack

Clack is a Deno module for reading keyboard events from the terminal.

import {keydownEvents} from "https://deno.land/x/clack/mod.ts"

for await (const keypress of keydownEventListener()) {
    console.log(keypress);

    if (keypress.ctrl && keypress.key === 'c') {
      Deno.exit(0);
    }
}