D
Deno

help

addEventListener for keydown in terminal via deno?

DDNA8/25/2023
Is there something like addEventlistener("keydown") in deno, so i can capture terminal inputs?
/|\ /|\8/25/2023
I don't think you can but you can use prompt to ask for user input
IioB8/25/2023
@im_beast thoughts? Beast is kind of the terminal expert here Doesn't deno_tui have a good keyboard library?
BBeast8/25/2023
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
DDNA8/26/2023
Ok, thank you guys very much gamergaming

Looking for more? Join the community!

Recommended Posts
Deno KV Type ErrorWhen I run await (await kv.get<typeThing>(["example"])).id (the value is an object), it returns a tyHow to improve seo ?https://deno.land/x/blog My question is when you use tool like this that work with md, how can i do Hashbang with TS file (without .ts extension)Hi y'all, I have a few convenience scripts written in Typescript for Deno that all have a wrapper scAstro + Deno - Remote ImportsFirst of all thanks a lot for the nice template, it looks great !! I followed the guide posted hereDebugging test in VSCode always breaks on line 54 of colors.tsWhen debugging tests in VSCode the debugger always breaks on line 54 of colors.ts. This behavior is Building from `src` offline?Hey guys! I'm new to Deno (and web dev as well to be honest), so could you help me here please. I'Any plan to fix Deno.listenTls() timing out a WebSocket connection?Any plan to fix Deno.listenTls() timing out a WebSocket connection? ``` {code: 1001, reason: 'No rePlaying sound from fileHow can i play the sound from a local file using deno?Deno with the --inspect-wait arg doesn't expose /json/protocol - should it?I'm testing out connecting to a Deno process via the v8 inspector protocol: https://deno.land/manual`deno test` and VSCode test runner are failing to run all test filesIn my Fresh projects, I'm trying to run all my tests with a single command. This used to not be an iHelp on Deno deploy that failsHi all, I'm having an issue on Deno deploy that states as follow: 'Error: The deployment failed: MoDeno console.log() all items of arrayHey how can I enable all of the output, so that Deno does not cut of items?Hey! i can't to download denoHEY~ I am a Taiwanese people so my English not good but I have a question My PowerShell show this Closing a fileHow do I close a file after opening and streaming it? My handler function code is as follows: ``` repuppeteer makes script to hang for a while at the endI am using `npm:puppeteer` in my script. Everything is working fine. But often the script hangs at tIn Fresh, how do I return a JSON response in a middleware?In Fresh, how do I return a JSON response in a middleware?get length for KV list via prefix?Is there a fast way to get just the count of items for a prefix?Property 'params' does not exist on type 'Context<State, Record<string, any>> ... what to do?I want to access params in oak, but typescript complains. What can I do about that? Thanks.What is the std library for making a guessing game like shown in rust?```rust use std::io; fn main() { println!("Guess the number!"); println!("Please input youData must be valid JSONA simple project, after successful deployment, reports an error "Data must be valid JSON".