| Index: LayoutTests/fast/events/js-keyboard-event-creation.html
|
| diff --git a/LayoutTests/fast/events/js-keyboard-event-creation.html b/LayoutTests/fast/events/js-keyboard-event-creation.html
|
| index 753d611869fe974662c984233e0d80b5a0787b12..3e61f87de3106cf74ec550668360fddcff135006 100644
|
| --- a/LayoutTests/fast/events/js-keyboard-event-creation.html
|
| +++ b/LayoutTests/fast/events/js-keyboard-event-creation.html
|
| @@ -2,9 +2,29 @@
|
| <head>
|
| <script>
|
|
|
| +function keyLocationToText(location)
|
| +{
|
| + switch (location) {
|
| + case KeyboardEvent.DOM_KEY_LOCATION_STANDARD:
|
| + return "DOM_KEY_LOCATION_STANDARD";
|
| + case KeyboardEvent.DOM_KEY_LOCATION_LEFT:
|
| + return "DOM_KEY_LOCATION_LEFT";
|
| + case KeyboardEvent.DOM_KEY_LOCATION_RIGHT:
|
| + return "DOM_KEY_LOCATION_RIGHT";
|
| + case KeyboardEvent.DOM_KEY_LOCATION_NUMPAD:
|
| + return "DOM_KEY_LOCATION_NUMPAD";
|
| + case KeyboardEvent.DOM_KEY_LOCATION_MOBILE:
|
| + return "DOM_KEY_LOCATION_MOBILE";
|
| + case KeyboardEvent.DOM_KEY_LOCATION_JOYSTICK:
|
| + return "DOM_KEY_LOCATION_JOYSTICK";
|
| + default:
|
| + return "" + location
|
| + }
|
| +}
|
| +
|
| function keyevent(event) {
|
| var p = document.createElement("p");
|
| - p.appendChild(document.createTextNode(event.type + " - key: " + event.keyIdentifier + "@" + event.keyLocation + " (keyCode/charCode: " + event.keyCode + "/" + event.charCode + ")" + " modifiers: " + event.ctrlKey + "," + event.altKey + "," + event.shiftKey + "," + event.metaKey));
|
| + p.appendChild(document.createTextNode(event.type + " - key: " + event.keyIdentifier + "@" + keyLocationToText(event.keyLocation) + " (keyCode/charCode: " + event.keyCode + "/" + event.charCode + ")" + " modifiers: " + event.ctrlKey + "," + event.altKey + "," + event.shiftKey + "," + event.metaKey));
|
| document.getElementById("result").appendChild(p);
|
| }
|
|
|
|
|