How do I detect mouse clicks and key presses with Deno.stdin?
I don't even really have any base code, so I was just wondering as to how do I do the problem specified in the title.
5 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Ah yeah, I saw that. I was just trying to figure out how it worked, but couldn't exactly pin-point it
using
Deno.stdin.setRaw
& using escape sequences (https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797)Sorry that I noticed it after that long time (if it's already irrelevant sorry for pinging), key and mouse keypress reading happens here:
https://github.com/Im-Beast/deno_tui/blob/main/src/key_reader.ts
Thank you very much nontheless! Helped a quite a bit