English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] read a key press
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-05 (10:12)
From: zw <zhaoway@p...>
Subject: [Caml-list] read a key press

I want to write a small echo program (for self amusement). It's like 
that everytime I press a character key, there's a hook function got 
called. Somewhat like a event loop.

I found Stream can't do this. Stream only begins to parse the input from 
keyboard after I press Ctrl-D. read_char from Pervasive can't do this 
either. It only begins to do stuff after I press the Return key. What I 
want is a read function that read instantly after a charcter key being 

Can you give me some recommendations? Thanks in advance.

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners