agorushkin
agorushkin2y ago

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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
agorushkin
agorushkin2y ago
Ah yeah, I saw that. I was just trying to figure out how it worked, but couldn't exactly pin-point it
crowlKats
crowlKats2y ago
using Deno.stdin.setRaw & using escape sequences (https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797)
Beast
Beast2y ago
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
agorushkin
agorushkin2y ago
Thank you very much nontheless! Helped a quite a bit