Skip to content

sparklypig/RawControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This library provides a function, rawControl() that allows you to easily handle asynchronous user input from the terminal.

There are three arguments, controls, dispBuff, and dflt (I may change the names for verbosity) controls: A map of buffer strings to functions. When a key is pressed, it's buffer is compared to the object and its corresponding function is run dispBuff (optional; defaults to false): A boolean that enables displaying the buffer of any key htat has not been assigned in controls dflt (optional): A function that runs on every keypress (usually a screen refresh) quitBuffer (optional; defaults to '03' (ctrl+c)): A buffer string that will leave raw control. Careful messing with this!

This library is intended for my own personal use. It and its functionality may change as my needs change and as I become a better programmer. If anyone has any ideas on how to improve this, I'd be curious!

About

wrapper for node raw control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published