diff --git a/README.md b/README.md index 7de2ceb9..0eac25f3 100644 --- a/README.md +++ b/README.md @@ -350,6 +350,10 @@ localhost: Phones and tablets get touch input (tap to click, drag, long press to right click, pinch to zoom, two fingers to move around a zoomed-in view and scroll) and an on-screen keyboard. +The toolbar's trackpad button switches to trackpad mode, which works like a laptop's +trackpad: one finger moves a cursor from where it is (farther the faster it moves), a +tap clicks and a two-finger tap right clicks where the cursor is, and press and hold, +then move, drags. The whole screen is the trackpad, and the browser remembers the mode. **Wayland?** Not yet; on Linux voxl streams X11 displays, Xvfb included. The virtual desktops voxl is built for run on Xvfb (E2B's and Daytona's do too), and X11 lets voxl diff --git a/web/index.html b/web/index.html index 2a901ac6..7d66a532 100644 --- a/web/index.html +++ b/web/index.html @@ -92,6 +92,29 @@ display: block; pointer-events: none; } + /* Trackpad mode takes touches anywhere in the window, around the desktop too. */ + #pad { + position: fixed; + inset: 0; + touch-action: none; + } + /* Trackpad mode's cursor (pointer.ts): touch screens show no pointer, so the page + draws the desktop's cursor image (cursor.ts) where the pointer is. It scales + back by the pinch zoom (zoom.ts) to keep its size, around its hotspot. */ + #pointer { + display: none; + position: absolute; + z-index: 1; + pointer-events: none; + background: 0 0 / 100% 100% no-repeat; + transform: scale(calc(1 / var(--zoom, 1))); + } + #surface.trackpad #pointer { + display: block; + } + #surface.trackpad #pointer.none { + display: none; + } .stripe { position: absolute; left: 0; @@ -340,19 +363,26 @@ height: 20px; } #kb-btn, + #tp-btn, #files-btn, #mic-btn { display: none !important; } #tools.touch #kb-btn, + #tools.touch #tp-btn, #tools.files #files-btn, #tools.mic #mic-btn { display: inline-grid !important; } - /* Read-only: nothing on the desktop accepts what the keyboard would send. */ - #tools.read-only #kb-btn { + /* Read-only: nothing on the desktop accepts what the keyboard or trackpad would send. */ + #tools.read-only #kb-btn, + #tools.read-only #tp-btn { display: none !important; } + #tp-btn.on, + #tp-btn.on:hover { + background: var(--state-pressed); + } /* While the microphone is live the toolbar stays up as a recording indicator. */ #tools.mic-on { opacity: 1; @@ -737,7 +767,11 @@ -
+ +
+ +
+