Field inside VR
Use Field with the headset on: edit Kotlin in Monaco, run a box, inspect its output and move between boxes on the live canvas. The same document stays open in the desktop app and any other connected browser.
The IDE is a high-resolution browser panel inside Field's Vulkan/OpenXR scene. Controllers point, click, scroll, move and resize it. On Quest 3 with WiVRn, a keyboard and mouse connected to the headset provide ordinary text editing and a cursor inside the panel, without desktop window focus. This workflow has been used for development in the headset on the Linux/NVIDIA setup below, and it also runs from an Apple silicon Mac through WiVRn for macOS.

For the separate Linux → Apple Vision Pro CloudXR route, including native hand actions, optional IDE surfaces and its current keyboard limitation, see Linux to Apple Vision Pro.
Start it
Launch 1 — VR IDE renderer, then 2 — Live IDE in VR. The starting point defaults to a
desktop companion. For the headset, connect your OpenXR runtime first, set useHeadset = true
in box 1, restart Field and launch both boxes again. Eye targets use the runtime's actual dimensions.
The browser opens the same document. Select Playground, open its editor, change the message or colour and press Run box in the panel toolbar. The result appears under the box, just as it does on the desktop.
Desktop headset preview
The starting point opens a second native window, Field · headset preview, alongside the interactive browser companion. It shows an aspect-correct left-eye view of the scene. In box 2, Side-by-side eyes shows both eyes instead. The preview samples the same eye layers sent to OpenXR; it does not run the scene a second time.
Close the preview window to hide it and suspend its presentation. Show headset preview in box 2 reopens it. Its presentation uses a best-effort path so an unavailable desktop image does not hold up headset rendering. Keyboard and mouse focus still belong to the front-on companion; the scene preview is for viewing the headset image.
Point, edit and run
Point either controller at the panel and pull the trigger to click or drag. A on the right controller or X on the left also clicks. The hand that starts a drag keeps control until you release it. Use the thumbstick or trackpad to scroll in either direction: a small deflection moves slowly, a full deflection faster. Losing tracking releases a held mouse button. Hand tracking does not point or click in the IDE, so you can move your hands over the keyboard without taking the cursor away from the mouse.
Aim at any part of the panel and hold grip to pick it up. Moving and rotating that controller moves and rotates the whole panel, preserving the initial attachment offset. Release grip to leave it in place. Browser clicks are suspended while moving the panel; losing tracking drops it safely at its last pose.
While holding the panel, aim the other controller at it and squeeze its grip too. Move your hands apart to enlarge the panel or together to shrink it. Its aspect ratio stays fixed, and moving both hands together moves its centre. Release either grip to continue moving it with the remaining hand, or release both to leave it in place. Recenter preserves the resized dimensions. This changes the plane's physical size; the browser's pixel resolution stays the same.
The toolbar's Keyboard button opens text, punctuation, arrows, selection, clipboard and undo keys. It keeps the editor or palette search focused while you click its keys. Run line executes the current line or selection (Alt+Enter); Run box launches the whole selected box (Alt+Up). Commands opens Field's palette; Esc dismisses it. A physical keyboard also works while the native mirror window has focus. The virtual keyboard is a basic ray keyboard; there is no dictation or predictive typing.
Click Recenter in the toolbar along the bottom of the panel to place it upright in front of your current head position, keeping its chosen size. It stays in the room as you move your head. Stop box 2 to close the offscreen browser and remove the panel's input hooks. Restart Field to change OpenXR mode or eye dimensions.
Choose your input
For Apple Vision Pro, Linux → CloudXR → AVP is the verified Wi-Fi route with native hand actions. With a Mac, edit in Chrome through Mac Virtual Display; the in-app hardware keyboard limitation is documented on that page. The SteamVR/ALVR setup below remains an alternative prepared path.
For Mac → Quest, use the companion window or in-panel keyboard; see macOS through WiVRn.
| Input | What receives it | Desktop window focus |
|---|---|---|
| Controller trigger | The control under the ray on the VR panel | Not required |
| Keyboard and mouse attached to the PC | The front-on companion window | Required |
| Keyboard and mouse attached to the Quest | The VR browser through WiVRn HID forwarding | Not required after setup |
The headset mouse has a cursor confined to the browser page. It does not steer the Linux desktop pointer or the other browser client's pointer. Clicking a text field or editor in the panel chooses where the headset keyboard types. Switching between these inputs does not change which Field document the panel displays.
A real keyboard
For a keyboard attached to the PC while OpenXR is active, set headsetInput = false in the
FieldVrWorkspace(...) constructor in box 2, then stop and relaunch that box. This selects the
desktop focus behaviour below. The default Linux/OpenXR mode uses the dedicated headset input path.
FIELD_VR_INPUT=desktop selects this default for all panels in a Field process;
FIELD_VR_INPUT=wivrn explicitly selects WiVRn on Linux/OpenXR. An explicit constructor argument
overrides the environment choice.
A USB or Bluetooth keyboard attached to the desktop uses the native companion window's key and text callbacks, forwarded into the focused Chromium editor. The companion displays the same page front-on, with aspect-correct direct mouse input. Real keyboard explicitly requests desktop window focus. Controller clicks choose the focused browser control without changing the desktop's focused app. If the window manager refuses the explicit request, focus Field · VR IDE on the desktop once. This does not capture keys globally from other applications. Ordinary modifiers, arrows, shortcuts and Unicode text use the existing browser input path.
Alt-Tab to another app returns the physical keyboard and mouse to that app. Alt-Tab back reactivates the companion's keyboard input; focus loss releases its held keys and buttons. The mouse cursor is also visible on the VR panel. Moving a controller resumes its ray cursor; a held mouse drag keeps ownership until release or an explicit controller press.
Headset keyboard and mouse, without desktop focus
On Linux/OpenXR, FieldVrWorkspace automatically listens for WiVRn's virtual WiVRn Keyboard
and WiVRn Mouse devices. It captures those identified virtual devices and sends their events
directly to this Chromium panel. A headset mouse
moves a cursor inside the page; clicks, held drags and vertical/horizontal scrolling use that
cursor. Moving the panel leaves the cursor at the same page coordinates. An explicit controller
press can take over; controller hover cannot interrupt a mouse drag.
The desktop window does not need focus. In this mode Real keyboard focuses the browser control path without requesting desktop window focus. Keys go to the panel's focused editor, palette or input. The toolbar reports waiting, capture and permission status. Disconnects and input overflow release held keys/buttons; reconnecting does not replay already-held presses. The desktop-connected devices still use the ordinary companion-window focus described above.
Install the narrowly scoped Linux device rule once, as the user who runs Field. The command is a
dry run unless --install is present. From the Field repository, inspect the plan, then install:
python3 tools/setup_wivrn_input.py --user "$USER" --serve-port 8443
sudo python3 tools/setup_wivrn_input.py --install --user "$USER" --serve-port 8443
This grants your user access only to WiVRn's two identified virtual devices, excludes them from desktop
libinput, enables WiVRn HID forwarding, and adds a private Tailscale HTTPS listener on the unused
port 8443. It registers that exact hostname and port with Field's browser-origin guard; restart
Field after installation so it loads the registration. Existing listeners are preserved; an occupied or public target port is refused. Omit
--serve-port 8443 when only input setup is wanted. Reconnect WiVRn afterwards so the desktop
sees newly created devices with the rule applied. Stop the VR panel to release Field's grabs;
the device rule continues excluding those forwarded devices from the desktop.
Attach the keyboard and mouse to the Quest by USB-C hub or Bluetooth. WiVRn must capture and forward the devices; its Android client forwards relative mouse events, rather than an absolute Android system pointer. Headset-connected keyboard and mouse input has been tested on Quest 3 with this setup. The keyboard layout settings below apply to these forwarded devices. See WiVRn's HID configuration and its Android input handler.
The default keyboard layout is US. Set FIELD_VR_KEYBOARD_LAYOUT,
FIELD_VR_KEYBOARD_VARIANT and FIELD_VR_KEYBOARD_OPTIONS before launching Field to select XKB
layout, variant and Compose options. Shift, Ctrl, Alt, Meta, AltGr and dead-key composition are
translated without relying on a desktop keyboard seat. For example, use layout us, variant
intl for international dead keys, or layout fr for a French keyboard.
A remote browser on the same document
The setup helper prints a Private Field URL after installing the listener. Open that address
from a browser with access to the same tailnet. Set its file query parameter to the document
shown in your VR panel; for example, ?file=Field-VR-IDE. If Field runs on a different port, pass
--field-port with that port to the helper when configuring the listener.
Use the same document name in both clients. Edits flow through the shared Field server, while each browser keeps its own selection, caret, scroll and keyboard/mouse focus. You can work in a palette or input in one browser while text changes in the other.
Nobody needs to operate the PC display. Field still requires a working graphics/display session for Vulkan and Chromium, and WiVRn must be running and paired. This workflow does not remove the Linux display-session requirement. Start Field, connect WiVRn and launch the two starter boxes before working from the headset. These can be managed remotely; no person needs to operate a window on the PC. The helper adds a private listener while preserving existing listeners.
Apple Vision Pro through ALVR
For the working Linux-to-AVP route tested with this scene infrastructure, start with CloudXR. The ALVR instructions here describe a separate integration.
The host path is Field OpenXR → SteamVR → ALVR → Vision Pro. Use the same starting point and high-resolution browser panel. This is a prepared integration path; Vision Pro rendering, controller bindings and hand interaction have not yet been tested with Field.
Install the visionOS ALVR client and a compatible Linux ALVR streamer on the rendering PC. Install SteamVR, start the ALVR dashboard, register its driver and connect/trust the headset. Follow ALVR's version compatibility instructions for the client you actually have installed. The dashboard manages the connection; Field's launcher does not install or start ALVR.
Stop the existing Field process before replacing a server on the same port. From the Field checkout:
# Read-only: find SteamVR and print the exact environment and command.
uv run python tools/field_alvr.py --check -- /path/to/workspace -d Field-VR-IDE
# Once ALVR is connected, launch Field with the SteamVR runtime for this process.
uv run python tools/field_alvr.py -- /path/to/workspace -d Field-VR-IDE
For a Steam library that discovery cannot find, add --steamvr /path/to/SteamVR before --.
The launcher sets XR_RUNTIME_JSON for Field and FIELD_VR_INPUT=desktop; it leaves the system's
default OpenXR runtime and the WiVRn configuration untouched. Set useHeadset = true in starter
box 1, then launch box 1 followed by box 2. Restart Field when changing runtimes.
Use the PC's keyboard and mouse with the companion window focused, or the in-panel virtual keyboard. Headset-attached keyboard and mouse forwarding is not provided by this integration. The inspected visionOS client has an unfinished keyboard handler and does not expose WiVRn's HID devices (client source). The Quest udev helper does not apply to ALVR. Full focus-independent headset typing and mouse input needs an additional visionOS input bridge. Hand joints and emulated controller actions also depend on what ALVR and SteamVR expose; the Quest interaction results below do not verify them.
This streamed Linux renderer is separate from Field's native visionOS frontend.
macOS through WiVRn
The path is Field OpenXR → WiVRn for macOS → Quest: the Mac renders, the headset displays. WiVRn for macOS is a port of the WiVRn server that encodes with VideoToolbox and streams to the ordinary WiVRn headset app. The starting point, the browser panel, controller pointing and grip work as described above.
You need an Apple silicon Mac. The WiVRn headset app must use a compatible server version; Field's setup currently installs the macOS port's pinned 26.9.5 release.
Run ./field.sh --setup, select WiVRn headset streaming, then choose INSTALL for any
missing Homebrew prerequisites and BUILD to prepare WiVRn. Setup verifies the release
archive's SHA-256, installs a missing app in ~/Applications/WiVRn.app, builds the Khronos
OpenXR loader in .afield-local/openxr, and configures VideoToolbox HEVC. An existing app in
/Applications or ~/Applications is retained. New installs need no administrator privileges;
macOS app approval, permissions and headset pairing still happen in WiVRn.
The same preparation can be run directly after installing Python, CMake and Apple's Command Line Tools:
python3 tools/field_wivrn_macos.py --prepare
LWJGL ships no OpenXR loader for macOS. The encoder setting prevents the automatic software
x264 fallback that stopped the server in our MoltenVK tests. It edits only the encoder in
~/.config/wivrn/config.json, preserving the other settings. Restart an already running
WiVRn after changing it. Setup does not select a global OpenXR runtime or change Field's
Vulkan driver outside the WiVRn launch.
Open WiVRn and pair the headset. In the headset app, add the Mac by its IP address if it is not listed, and enter the PIN that the WiVRn window shows while pairing is enabled. Then start Field with WiVRn as its OpenXR runtime:
# Read-only: print the environment and command, and anything still missing.
uv run python tools/field_wivrn_macos.py --check -- /path/to/workspace -d Field-VR-IDE
# Launch Field with WiVRn for this process.
uv run python tools/field_wivrn_macos.py -- /path/to/workspace -d Field-VR-IDE
The launcher sets
XR_RUNTIME_JSON, the loader path and the Vulkan driver for this Field process only. The driver is
MoltenVK, because WiVRn's runtime shares its eye images with Field through VK_EXT_metal_objects,
which KosmicKrisp does not provide. Your default OpenXR runtime and Field's default driver are
left as they were. Set useHeadset = true in starter box 1, then launch box 1 followed by box 2.
Restart Field to leave OpenXR mode.
To stay on KosmicKrisp, select WiVRn headset streaming on KosmicKrisp in ./field.sh --setup
as well, which also builds a patched copy of WiVRn's runtime, then launch with --kosmickrisp:
# The same preparation run directly: also clone the pinned WiVRn for macOS into ~/.field4/wivrn-macos
# and build its runtime with Field's patch.
python3 tools/field_wivrn_macos.py --prepare --kosmickrisp
# Launch Field on KosmicKrisp with that runtime.
uv run python tools/field_wivrn_macos.py --kosmickrisp -- /path/to/workspace -d Field-VR-IDE
The patch
makes the runtime copy each eye image into WiVRn's IOSurface on the GPU instead of wrapping it,
which KosmicKrisp can do. The installed WiVRn.app still runs the server. The build needs
Xcode and the LunarG Vulkan SDK in ~/VulkanSDK, which
setup checks for, and the port's Homebrew build dependencies, which setup installs. It rebuilds the
runtime when Field's pin or patch changes, and --check reports a runtime built from an older one.
In our tests, the frame rate was within a few frames per second of MoltenVK.
Type with a keyboard attached to the Mac while the companion window has focus, or use the in-panel keyboard. WiVRn's headset keyboard and mouse forwarding is Linux-only.
Frame rate and latency on the Mac
Field renders at the headset's refresh rate; WiVRn's encoder is what limits the stream. The headset app's refresh rate and stream scale decide whether it keeps up. Measured on an M1 Max MacBook Pro on Wi-Fi with a Quest 3, with the VR IDE running:
| Headset app setting | Stream per eye | Frames reaching the headset |
|---|---|---|
| 120 Hz, stream scale 1.0 | 2176 × 2304 | about 36 per second |
| 90 Hz, stream scale 1.0 | 2176 × 2304 | 78–85 per second |
| 90 Hz, stream scale 0.5 | 1088 × 1088 | about 90 per second |
Use 90 Hz. At 120 Hz each eye takes longer to encode than a frame lasts, so most frames miss their slot. Stream scale trades sharpness for smoothness: 0.5 keeps the full rate, and a higher scale gives sharper text at a lower rate. WiVRn for macOS caps the stream at 2176 × 2304 per eye, so past that a higher render resolution adds nothing to the stream.
The headset app's motion-to-photon overlay, which reports the worst case, read about 150 ms at stream scale 1.0. Turning off hand tracking in the headset app, when you use controllers, brought that to about 130 ms, and stream scale 0.5 to about 90 ms. A wired connection for the Mac shortens the network step.
Restart WiVRn and Field after changing settings in the headset app; a resumed session keeps the old ones. If the headset cannot reconnect after it sleeps, quit and reopen WiVRn, then restart Field.
What has been verified
The Quest 3, WiVRn and Linux/NVIDIA workflow was tested on-headset on 2 November 2026. Keyboard and mouse attached to the headset supported editing and running Field code without interacting with a desktop window. Controller clicks, two-axis scrolling, grip positioning and two-controller grip resizing were also confirmed usable in the headset. Hand pointing and pinch are disabled in the IDE to preserve mouse ownership.
The private Tailscale listener also served two real Chromium clients that exchanged document edits while preserving independent focus. That check used two clients on one host; a second physical remote computer has not yet been checked. Field still needs the graphics/display session described above, even when nobody is using the PC screen.
The Quest 3, WiVRn for macOS and Apple silicon path was tested on-headset on 12 November 2026 (M1 Max, macOS 26.5, WiVRn for macOS 26.9.5): the VR IDE panel displayed and was usable in the headset, with the frame rates and latency above, on MoltenVK and on KosmicKrisp with the patched runtime. Headset-attached keyboard and mouse and body tracking are not supported on this path.
Rendering and input checks
The companion figure is captured from the real Chromium-to-Vulkan browser path. It shows the desktop companion; it is not a through-the-lens headset photograph. Automated checks cover pointer ownership, keyboard translation, scroll batching, grip handoff, resized hit testing and browser-origin policy. A separate pixel check confirmed the background is opaque on first load, before scrolling. The source browser normally runs at 30 frames per second on Linux; head tracking and stereo rendering continue at the headset's rate.
Readable text
The browser's default is 2560 × 1600, on a two-metre-wide panel 1.35 metres away. Browser
resolution controls the source text raster; WiVRn render resolution independently controls the
headset's eye targets. Increasing only one can leave the other as the limiting factor. Change the
constructor's width/height, widthMeters and distanceMeters to suit your setup.
The browser viewport is set explicitly after page readiness so desktop scaling or a native window size limit cannot silently change the texture extent. The background is repainted after Chromium finishes changing the viewport, so no initial scroll is needed to make the canvas draw correctly. The panel samples Chromium directly without FXAA or temporal filtering of the text. On Linux this checkout uses the explicit bitmap browser fallback, normally at 30 browser frames per second; head tracking and stereo rendering continue at the headset's rate. On macOS the existing IOSurface transport stays on the GPU. See the browser transport.
val vr = FieldVrWorkspace(
renderer = renderer,
url = FieldUiBrowserTexture.fieldDocumentUrl(thisBox),
width = 2560,
height = 1600,
)
// Construct after the initial renderer frame, then run the renderer normally.
// Close vr when its owning box stops.
Multiview scene rendering
This path requires Vulkan multiview support; the current functional check used Linux/NVIDIA.
The workspace uses one multiview scene pass for both eye layers. Browser upload/input runs once
per frame, and graphics modules share eye matrices through a uniform buffer. OpenXR copies the
two layers directly to its eye swapchains. workspace.stereo.mirrorToScreen(windowIndex = 1)
adds an aspect-correct left-eye preview to an existing second renderer window; pass
stereoPair = { true } to show both eyes. Controller, grip-resize and keyboard/mouse focus
behavior use the same input path.
Eye-image precision
The shared multiview renderer uses floating-point eye images, and the OpenXR handoff prefers a floating-point or ten-bit runtime swapchain. The browser texture can remain eight-bit without forcing the scene to that precision. Restart Field to pick up a new swapchain format. Runtime format support and WiVRn's negotiated stream bit depth still determine the handoff; see stereo video precision for the stages to check.
World-space audio through WiVRn
Place a mono WAV in the OpenXR scene with SpatialWavPlayer. Steam Audio renders it as binaural
stereo using the headset pose, through a named WiVRn output; your desktop's default output stays
as it was. Install Steam Audio's native library first with ./gradlew fetchSteamAudioNatives.
val sound = SpatialWavPlayer(
"voice.wav".file,
renderer.openXRHmdTarget!!.asHeadPoseSource(),
)
sound.openWiVRn()
sound.place(-.6, 1.5, -1.5) // world metres: X right, Y up, -Z forward
sound.gain = .2f
sound.play()
loop { frame() }.end { sound.close() }
pause() keeps your place, seek(seconds) scrubs, and restart() starts from zero. The audio
example under templates/text_one/audio/ adds controls and a bundled mono percussion WAV. For
stereo WAVs, the player uses the left channel as its mono source. You get HRTF direction and
distance attenuation; room geometry, occlusion and reverberation are not simulated yet. OpenAL
disables its own HRTF on the dedicated output.
Connect headset audio before opening the output. If the WiVRn device reconnects, stop and relaunch the audio box. The player closes when you stop, replace or delete the box. Audio runs on its own device-paced thread; the graphics Runloop reads and changes its controls.
To inspect the tracking data behind headset interactions, open body_one. It draws available hands, sparse body joints and controllers, with bounds and closest-point helpers.
API reference
Implementation and parameter details for the helpers used above: