mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
This allows terminal control sequences to work in the web version of
the ghostty terminal. For a ctrl+c sequence, we would previously send:
key=Unidentified code=KeyC
We now send:
key=c code=KeyC
15 lines
428 B
HTML
15 lines
428 B
HTML
<!DOCTYPE html>
|
|
<input id="input" />
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
input.addEventListener("keydown", e => {
|
|
println(`key="${e.key}" code=${e.code} ctrlKey=${e.ctrlKey}`);
|
|
e.preventDefault();
|
|
});
|
|
|
|
internals.sendKey(input, "C", internals.MOD_CTRL);
|
|
internals.sendKey(input, "C", internals.MOD_CTRL | internals.MOD_SHIFT);
|
|
});
|
|
</script>
|