DNA
DNA11mo ago

addEventListener for keydown in terminal via deno?

Is there something like addEventlistener("keydown") in deno, so i can capture terminal inputs?
4 Replies
/|\  /|\
/|\ /|\11mo ago
I don't think you can but you can use prompt to ask for user input
ioB
ioB11mo ago
@im_beast thoughts? Beast is kind of the terminal expert here Doesn't deno_tui have a good keyboard library?
Beast
Beast11mo ago
deno_tui has a keypress module, but there's basically no documentation to it (but it's pretty simple) but I think cliffy has keypress module too and it should have better documentation also addEventListener for keydown/mousedown/etc would be a very good feature to have in a js runtime
DNA
DNA11mo ago
Ok, thank you guys very much gamergaming