Cleverson Casarin Uliana wrote on 11/28/2017 05:12 PM:
Hello, I'd like a library to detect any key press on a terminal (from single characters to key combinations), so I can perform diverse actions when one is pressed. I tried the charterm package, but it seems not compatible with the Windows standard console, since it reports it cannot find /dev/tty on startuup, or maybe I don't know how to make it work?

Sorry, the `charterm` package only works when running on Unix-like systems (GNU/Linux, a BSD-derived Unix, reportedly Mac OS X), not Windows.  I should be clear in the docs that it doesn't work on Windows.

For running on Windows, and responding to a Windows text command window, you don't want `charterm`, and might need to do something with the Win32 console API (IIRC).  Maybe you can do this with the Racket FFI.

Or, in the less common scenario of running on Windows, and dealing with a terminal plugged into a serial port or other device, you'd probably need a Win32 serial API, or API for whatever funky terminal interface you're using.

(Ideally, most CS people will normally run GNU/Linux or a BSD, for promoting technical/engineering freedom and open science and such. But sometimes we have to work on other platforms.)

You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to