Watch
0
0
Fork
You've already forked hyperhive
0

agent: let the screen page keep reload, the address bar and its own buttons

The page forwarded every key to the remote desktop and cancelled it, so F5 and
Ctrl+R could not reload, though the disconnect message tells the operator to
reload, and Enter or Space on the fit and debug buttons did nothing. F5, F12,
Ctrl/Cmd+R, Ctrl/Cmd+L and any key pressed on a button now go to the browser;
the rest still go to the remote desktop. The filter is a small module with a
test, bundled for the page as static/screen-keys.js, and the agent-page doc
describes it.
This commit is contained in:
iris 2026-11-25 19:24:08 +01:00
commit ff7215a4b1

View file

@ -47,6 +47,12 @@ credentials arrive from the swarm secret store.
Fit-mode state persists in `localStorage` (`screen-fit`); default
is on. `sendPointer` rescales pointer coordinates so presses
land on the right pixel regardless of CSS scale.
Keyboard events go to the remote desktop and the page cancels them,
except the keys the browser keeps: F5 and F12, Ctrl or Cmd with R or L,
and any key pressed while one of the page's buttons has focus. That filter
is `keepForBrowser` in `src/screen-keys.js`, loaded by the page as
`static/screen-keys.js`, so the viewer can still reload and its buttons
work from the keyboard.
- `GET /screen/ws` — raw RFB byte relay: proxies WebSocket
frames to the weston VNC server at `127.0.0.1:<vnc_port>`.
Transparent to any RFB variant. VNC port comes from the