summaryrefslogtreecommitdiffstats
path: root/WebCore/manual-tests/log-keypress-events.html
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/manual-tests/log-keypress-events.html')
-rw-r--r--WebCore/manual-tests/log-keypress-events.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/WebCore/manual-tests/log-keypress-events.html b/WebCore/manual-tests/log-keypress-events.html
new file mode 100644
index 0000000..87e2288
--- /dev/null
+++ b/WebCore/manual-tests/log-keypress-events.html
@@ -0,0 +1,34 @@
+<html>
+<body>
+<p>This page is especially useful to test <a href="http://bugs.webkit.org/show_bug.cgi?id=5678">the shift-Tab issue</a>. Should see a code of 9.</p>
+<form name="f">
+Type here: <input id="field" type="text" />
+</form>
+<script language="javascript" type="text/javascript">
+<!--
+function logEvent(event) {
+ myDebugLog("--");
+ if (event.charCode)
+ myDebugLog("event.charCode: " + event.charCode);
+ if (event.which)
+ myDebugLog("event.which: " + event.which);
+ if (event.keyCode)
+ myDebugLog("event.keyCode: " + event.keyCode);
+ myDebugLog("shiftKey: " + event.shiftKey);
+ return false;
+}
+
+function myDebugLog(msg) {
+ var m = document.createElement("div");
+ m.appendChild(document.createTextNode(msg));
+ document.getElementById("debug-log").appendChild(m);
+}
+document.f.field.onkeypress = logEvent;
+// -->
+</script>
+
+<div id="debug-log">
+Key press values:
+</div>
+</body>
+</html> \ No newline at end of file