Repository navigation
feat(computer): pointer press and release during a take-over - #1795
Merged
Merged
Conversation
A person who holds the screen can press a pointer button, move and let go, which drags. A button still down when the screen is handed back is released. Resolves #1792
3 tasks
edenreich
marked this pull request as ready for review
November 10, 2026 00:27
This was referenced Nov 10, 2026
Merged
Contributor
|
🎉 This PR is included in version 0.253.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A person who took a screen over could not drag: a click was always a press followed at once by a release.
screen_inputnow acceptsmouse_downandmouse_up, so a client can hold a button down, sendmoveinputs and let go. That covers dragging a window, moving a file, selecting text with the pointer and sliders.Resolves #1792
Changes
internal/computer/domain- themouse_downandmouse_upaction kinds, accepted as person inputs with a position and a button, andHeldButtons, the buttons a person pressed and has not let go of.internal/computer/infrastructure/display-PressMouseandReleaseMouseonDisplayController. GNOME Wayland sends oneNotifyPointerButton, and X11, wlroots Wayland, macOS and Windows use robotgo'sToggle.internal/computer/input_dispatch.go- a press or release moves the pointer to its position, then holds or lets go of the button.internal/computer/screen_control.go- tracks the held buttons during a hold and releases them on hand-back, so the agent never gets the screen back mid-drag.docs/browser-extension-protocol.mdlists the new input kinds, anddocs/computer-use.mdmentions dragging.The
Computertool is unchanged: the executor routes only its own kinds, so the agent cannot send a press or release.Testing
task precommit:runandtask testpass, with new tests for the input mapping, the held-button tracking, the dispatch and the controller's toggle calls. It builds for Linux, Windows and macOS.TestToggleArgumentsis Linux-only and was vetted, not run, on the macOS machine this was written on.Not included
Docs follow-up: inference-gateway/docs#1172.