gpui: Support Force Touch go-to-definition on macOS#40399
Merged
as-cii merged 12 commits intozed-industries:mainfrom Dec 15, 2025
Merged
gpui: Support Force Touch go-to-definition on macOS#40399as-cii merged 12 commits intozed-industries:mainfrom
as-cii merged 12 commits intozed-industries:mainfrom
Conversation
aarol
commented
Oct 16, 2025
mikayla-maki
previously requested changes
Nov 6, 2025
Member
mikayla-maki
left a comment
There was a problem hiding this comment.
Great work on this PR, love the editor test!
Can you create a small GPUI example, call it "events.rs" say, that just opens a window and prints out the pressure events that are received?
Contributor
Author
|
I've added a small example for testing mouse pressure into examples. I wasn't able to figure out how to listen to the mouse pressure event from Let me know if these changes are sufficient! |
Resolved import conflict in editor.rs by keeping both PressureStage (from force-touch) and TextRun (from main).
Member
|
Code looks reasonable and I tested it manually, and it seems to work correctly. Queuing up for merging, thanks! |
as-cii
approved these changes
Dec 15, 2025
CherryWorm
pushed a commit
to CherryWorm/zed
that referenced
this pull request
Dec 16, 2025
…0399) Closes zed-industries#4644 Release Notes: - Adds `MousePressureEvent`, an event that is sent anytime the touchpad pressure changes, into `gpui`. MacOS only. - Triggers go-to-defintion on force clicks in the editor. This is my first contribution, let me know if I've missed something here. --------- Co-authored-by: Anthony Eid <anthony@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com>
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.
Closes #4644
Release Notes:
MousePressureEvent, an event that is sent anytime the touchpad pressure changes, intogpui. MacOS only.This is my first contribution, let me know if I've missed something here.