From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA13931; Thu, 2 May 2002 19:26:50 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA13926 for ; Thu, 2 May 2002 19:26:49 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g42HQlX13320 for ; Thu, 2 May 2002 19:26:47 +0200 (MET DST) Received: from mel-rta10.wanadoo.fr (193.252.19.193) by mel-rto2.wanadoo.fr (6.5.007) id 3CD12D5D000476AC for caml-list@inria.fr; Thu, 2 May 2002 19:26:47 +0200 Received: from debian (80.8.81.242) by mel-rta10.wanadoo.fr (6.5.007) id 3CD0C9A70007D358 for caml-list@inria.fr; Thu, 2 May 2002 19:26:47 +0200 Received: from moi by debian with local (Exim 3.35 #1 (Debian)) id 173KM5-0002gc-00 for ; Thu, 02 May 2002 19:26:57 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] catch keypressed References: From: Remi VANICAT Date: 02 May 2002 19:26:57 +0200 In-Reply-To: Message-ID: <87pu0e31ge.dlv@wanadoo.fr> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Vincent Barichard 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