Files
ladybird/Tests/LibWeb/Text/input/UIEvents/KeyEvent-numpad-keys.html
Timothy Flynn 5b2633d90f LibWeb: Support non-required numpad code names
These aren't required to comply with the UIEvents spec, but they are
required by WebDriver.
2024-10-10 10:41:10 +02:00

39 lines
683 B
HTML

<input id="input" />
<script src="../include.js"></script>
<script>
const NUMPAD_KEYS = [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"+",
",",
".",
"/",
"*",
"-",
"=",
"#",
"(",
")",
];
test(() => {
let input = document.getElementById("input");
input.addEventListener("keydown", e => {
println(`key="${e.key}" code=${e.code}`);
});
NUMPAD_KEYS.forEach(key => {
internals.sendText(input, key, internals.MOD_KEYPAD);
});
});
</script>