mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-25 01:19:45 +00:00
33 lines
714 B
HTML
33 lines
714 B
HTML
<!DOCTYPE html>
|
|
<input id="input" />
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
const FUNCTIONAL_KEYS = [
|
|
"CapsLock",
|
|
"Escape",
|
|
"Return",
|
|
"Space",
|
|
"Tab",
|
|
"LeftAlt",
|
|
"RightAlt",
|
|
"LeftControl",
|
|
"RightControl",
|
|
"LeftShift",
|
|
"RightShift",
|
|
"LeftSuper",
|
|
"RightSuper",
|
|
];
|
|
|
|
test(() => {
|
|
let input = document.getElementById("input");
|
|
|
|
input.addEventListener("keydown", e => {
|
|
println(`key=${e.key} code=${e.code}`);
|
|
e.preventDefault();
|
|
});
|
|
|
|
FUNCTIONAL_KEYS.forEach(key => {
|
|
internals.sendKey(input, key);
|
|
});
|
|
});
|
|
</script>
|