diff tests/keyEvent.ur @ 1783:5bc4fbf9c0fe

New event records for key and mouse handlers
author Adam Chlipala <adam@chlipala.net>
date Sat, 21 Jul 2012 10:02:53 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/keyEvent.ur	Sat Jul 21 10:02:53 2012 -0400
@@ -0,0 +1,7 @@
+fun main () : transaction page = return <xml><body>
+  <ctextbox onkeypress={fn ev => alert ("KeyCode = " ^ show ev.KeyCode
+                                        ^ "\nCtrlKey = " ^ show ev.CtrlKey
+                                        ^ "\nShiftKey = " ^ show ev.ShiftKey
+                                        ^ "\nAltKey = " ^ show ev.AltKey
+                                        ^ "\nMetaKey = " ^ show ev.MetaKey)}/>
+</body></xml>