tools/pbl: add QEMU touch injection (touch/swipe)#1790
Open
vvzvlad wants to merge 1 commit into
Open
Conversation
Developing touch navigation needed a way to drive the touchscreen under QEMU
without flashing hardware, so `./pbl qemu` now exposes a QMP socket and two
new commands inject touch events into a running emulator:
./pbl touch X Y tap at a pixel coordinate
./pbl swipe X1 Y1 X2 Y2 swipe, streaming intermediate moves so drag
gestures are seen as continuous
Coordinates are in screen pixels; the display size is read from the emulated
pebble-touch device and scaled to QEMU's absolute-axis range. Injection uses
the absolute-pointer input path (input-send-event abs+btn); multi-touch is not
wired up in the device.
Document the commands in docs/development/qemu.md and the working-with-qemu
skill.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Vlad Zaytsev <git@vvzvlad.xyz>
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.
While developing touch navigation I needed a way to drive the touchscreen
under QEMU to iterate and test without flashing hardware, so I wrote this.
./pbl qemunow exposes a QMP socket, and two commands inject touch into arunning emulator:
Coordinates are screen pixels; the display size is read from the emulated
pebble-touch device and scaled to QEMU's absolute-axis range. Swipes stream
intermediate moves so drag gestures are seen as continuous. Injection uses the
absolute-pointer input path (input-send-event abs+btn); multi-touch is not
wired up in the device.
Also documents the workflow in the working-with-qemu skill.
Tested on qemu_gabbro:
./pbl qemucreates the QMP socket; touch and swipeland at the expected coordinates (verified against the pebble-touch device
registers).