1 <body onkeypress="log(eventInfo(event))" onkeydown="log(eventInfo(event));">
2 <p>Test that Alt+Space works correctly.</p>
3 <p>To test manually, press Alt+Space - a menu for resizing the window should appear;
4 the window should not be scrolled.</p>
5 <p>Also, press other Alt-key combinations, and verify that keypress event is not dispatched.</p>
7 <div style="width:1;height:1000"></div>
10 document.getElementById("log").innerHTML+= msg + "<br />";
14 function eventInfo(event, where) {
18 target = event.srcElement ? event.srcElement : event.target;
19 if (event.type == "keydown" || event.type == "keypress" || event.type == "keyup")
20 return (where ? "(" + where + ") " : "") + target.tagName
21 + (target.tagName == "INPUT" ? " " + target.type : "")
23 + ' - ' + [event.ctrlKey, event.altKey, event.shiftKey, event.metaKey]
24 + ' - ' + event.keyIdentifier
25 + ' - ' + event.keyCode
26 + ' - ' + event.charCode;
31 log("target - type - " + ["ctrlKey", "altKey", "shiftKey", "metaKey"]
32 + ' - ' + "keyIdentifier"
34 + ' - ' + "charCode");
36 if (window.layoutTestController) {
38 layoutTestController.dumpAsText();
39 eventSender.dispatchMessage(eventSender.WM_SYSKEYDOWN, 0x12 /* Alt */, 0x20380001);
40 eventSender.dispatchMessage(eventSender.WM_SYSKEYDOWN, 0x20 /* Space */, 0x20390001);
41 eventSender.dispatchMessage(eventSender.WM_SYSCHAR, 0x20 /* Space */, 0x20390001);
42 eventSender.dispatchMessage(eventSender.WM_SYSKEYDOWN, 0x58 /* X */, 0x202d0001);
43 eventSender.dispatchMessage(eventSender.WM_SYSCHAR, 0x78 /* x */, 0x202d0001);