(************************************************************ keytest.ml Created : Tue Dec 30 03:56:10 2003 Last modified: Tue Dec 30 03:59:57 2003 Compile: ocamlc -dtypes -I +labltk labltk.cma keytest.ml -o keytest # FTP Directory: sources/ocaml # ************************************************************) (** @author Takashi Masuyama *) open Tk let _ = let window = openTk () in bind window ~events:[`KeyPress] ~fields:[`KeySymString] ~action:(fun e -> print_endline e.ev_KeySymString); mainLoop ();