mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 00:56:14 +00:00
19 lines
546 B
HTML
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>
|