Files
ladybird/Tests/LibWeb/Text/input/UIEvents/KeyEvent-keypress.html
Timothy Flynn c96c5e45ff LibWeb: Implement KeyboardEvent.charCode according to spec
It should be 0 for keydown/keyup events.
2024-10-22 12:48:58 +02:00

19 lines
546 B
HTML

<input id="input" />
<script src="../include.js"></script>
<script>
test(() => {
let input = document.getElementById("input");
input.addEventListener("keydown", e => {
println(`keydown key=${e.key} charCode=${e.charCode}`);
});
input.addEventListener("keypress", e => {
println(`keypress key=${e.key} charCode=${e.charCode}`);
});
internals.sendText(input, "A");
internals.sendKey(input, "LeftShift");
internals.sendText(input, "B");
});
</script>