English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    
Browse thread
[Caml-list] catch keypressed
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Remi VANICAT <vanicat@l...>
Subject: Re: [Caml-list] catch keypressed
Vincent Barichard <barichar@info.univ-angers.fr> writes:

> Hello,
> 
> I would like to catch the hit of a key without being in graphic
> mode. Something like :
> 
> while not keypressed() do
>   print_string "Hit a key";
> done;
> 
> Is a fonction of this kind exists in CAML ??
> And if it doesn't exist, is there a way to simulate its effect ??
> The read_int fonction blocks until user enter a value so it is not
> suitable for my problem.

the read_line function wait until return is pressed. It is not exactly
what you want, but it's often enough.
-- 
Rémi Vanicat
vanicat@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~vanicat
-------------------
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