[racket] keyboard input help?

From: Richard Cleis (rcleis at mac.com)
Date: Tue Sep 21 04:18:43 EDT 2010

Have you read about get-key-code (and other related functions) in the docs? On earlier versions of PLT Scheme I was investigating things like:

(on-subwindow-char the-win key-event)
(display (send key-event get-key-code))

I don't know how much things have changed since then.

>From the short description of what you are trying to do, I am not convinced that you need to process one input character at a time. Racket readers are hard to beat.

rac

On Sep 20, 2010, at 11:16 PM, Isaiah Gilliland wrote:

> I was wanting to see if there was at all a way to do asynchronous input from a keyboard in racket. Kinda like tcp-listen, that won't freeze up the program while it's used, and won't show in the terminal. I've just finished my first small utility in Scheme and want to move to something a bit more complicated. I'm going to try to create a cli text editor with a focus on lisp programming, but possibly able to extend to other languages. 
> The reason I want input straight from the keyboard is because I want to process the input for paren matching and do some formating before I print it. I guess I'm wondering if there is a way I can listen to keyboard events directly.
> Any info whatsoever would help me a lot, thanks 
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users



Posted on the users mailing list.