mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-11-22 08:13:59 +00:00
Untested: the servo-embed build has not completed since this change. Pointer-leave forwarding is not yet done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QS8QcxvhVJwU3X2qhPamUW
35 lines
1.4 KiB
HTML
35 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>WEFT input reference</title>
|
|
<style>
|
|
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
|
|
body { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 100vh; }
|
|
/* The left half scrolls: its colour fills the half, and a cyan block of
|
|
the same height lies beneath it, reached with the wheel. */
|
|
#pane { overflow-y: scroll; }
|
|
#left { height: 100vh; background: rgb(255, 0, 0); }
|
|
#below { height: 100vh; background: rgb(0, 255, 255); }
|
|
#right { background: rgb(0, 0, 255); }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="pane"><div id="left"></div><div id="below"></div></div>
|
|
<div id="right"></div>
|
|
<script>
|
|
// Each input the harness sends changes one half to a colour it checks for.
|
|
const left = document.getElementById("left");
|
|
const right = document.getElementById("right");
|
|
left.addEventListener("click", () => { left.style.background = "rgb(0, 255, 0)"; });
|
|
right.addEventListener("click", () => { right.style.background = "rgb(255, 255, 255)"; });
|
|
document.addEventListener("keydown", (event) => {
|
|
if (event.key === "a" && !event.shiftKey) {
|
|
right.style.background = "rgb(255, 255, 0)";
|
|
} else if (event.key === "A" && event.shiftKey) {
|
|
right.style.background = "rgb(255, 0, 255)";
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|