Is there any crate to read keycodes without any platform restrictions?

Viewed 37

I am looking for a crate that provides some way of reading either a Vec<u8> or a [u8; 4] from the terminal. I have found this crate which, in keyboard jargon, supports 80% on Linux and 60% on windows. This might as well be a system limitation, but as capturing arrow keys with crossterm works fine, I don't think so. I tried looking for alternatives on crates.io but haven't found anything yet.

P.S.: As I have seen this many times, I'll say it now: I don't want any other solutions; I want to get the keycodes of the key pressed as bytes or as a number, not as an enum or similar.

0 Answers
Related