Skip to content

nickhobbs94/keypress-promises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Use node 20+

npm i keypress-promises

Example usage

import { getKey, getInput } from 'keypress-promises';

const key = await getKey();
console.log(key);
// { sequence: 'j', name: 'j', ctrl: false, meta: false, shift: false }
// { sequence: '\x03', name: 'c', ctrl: true, meta: false, shift: false }

const userInput = await getInput('Enter your name: ');
console.log(`Your name is ${userInput}`);
// Your name is nick

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published