summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/monoize.sml10
-rw-r--r--src/settings.sml9
2 files changed, 14 insertions, 5 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index 4985c932..86d8389f 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -3311,8 +3311,14 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
val e =
case #1 dom of
L'.TRecord [] => (L'.EApp (e, (L'.ERecord [], loc)), loc)
- | _ => (L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "kc", []), loc)),
- loc), (L'.ERecord [], loc)), loc)
+ | _ =>
+ if String.isPrefix "Onkey" x then
+ (L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "keyEvent", []), loc)),
+ loc), (L'.ERecord [], loc)), loc)
+ else
+ (L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "mouseEvent", []), loc)),
+ loc), (L'.ERecord [], loc)), loc)
+
val s' = " " ^ lowercaseFirst x ^ "='uw_event=event;exec("
in
((L'.EStrcat (s,
diff --git a/src/settings.sml b/src/settings.sml
index 28739d6a..66bc7238 100644
--- a/src/settings.sml
+++ b/src/settings.sml
@@ -160,7 +160,8 @@ val benignBase = basis ["get_cookie",
"onConnectFail",
"onDisconnect",
"onServerError",
- "kc",
+ "mouseEvent",
+ "keyEvent",
"debug",
"rand",
"now",
@@ -194,7 +195,8 @@ val clientBase = basis ["get_client_source",
"onConnectFail",
"onDisconnect",
"onServerError",
- "kc",
+ "mouseEvent",
+ "keyEvent",
"onClick",
"onDblclick",
"onKeydown",
@@ -267,7 +269,8 @@ val jsFuncsBase = basisM [("alert", "alert"),
("substring", "ssub"),
("strcspn", "sspn"),
("strlenGe", "strlenGe"),
- ("kc", "kc"),
+ ("mouseEvent", "uw_mouseEvent"),
+ ("keyEvent", "uw_keyEvent"),
("minTime", "0"),
("islower", "isLower"),