diff lib/ur/basis.urs @ 895:ae9e22822ec5

Key events get key code input
author Adam Chlipala <adamc@hcoop.net>
date Sat, 18 Jul 2009 12:53:26 -0400
parents a3f58978ff32
children ed06e25c70ef
line wrap: on
line diff
--- a/lib/ur/basis.urs	Sat Jul 18 12:37:19 2009 -0400
+++ b/lib/ur/basis.urs	Sat Jul 18 12:53:26 2009 -0400
@@ -555,8 +555,9 @@
                    Onmousedown = transaction unit, Onmousemove = transaction unit,
                    Onmouseout = transaction unit, Onmouseover = transaction unit,
                    Onmouseup = transaction unit]
-con keyEvents = [Onkeydown = transaction unit, Onkeypress = transaction unit,
-                 Onkeyup = transaction unit]
+con keyEvents = [Onkeydown = int -> transaction unit, Onkeypress = int -> transaction unit,
+                 Onkeyup = int -> transaction unit]
+(* Key arguments are character codes. *)
 con resizeEvents = [Onresize = transaction unit]
 
 con boxEvents = focusEvents ++ mouseEvents ++ keyEvents ++ resizeEvents