Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On touch screens, press-and-hold equals a secondary click #4195

Merged
merged 8 commits into from
Mar 20, 2024

Conversation

emilk
Copy link
Owner

@emilk emilk commented Mar 20, 2024

On a touch screen, if you press down on a widget and hold for 0.6 seconds (MAX_CLICK_DURATION), it will now trigger a secondary click, i.e. Response::secondary_clicked will be true. This means you can now open context menus on touch screens.

@emilk emilk added feature New feature or request egui labels Mar 20, 2024
@emilk emilk merged commit d449cb1 into master Mar 20, 2024
35 checks passed
@emilk emilk deleted the emilk/long-press branch March 20, 2024 10:49
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
* Closes emilk#3444
* Closes emilk#865

On a touch screen, if you press down on a widget and hold for 0.6
seconds (`MAX_CLICK_DURATION`), it will now trigger a secondary click,
i.e. `Response::secondary_clicked` will be `true`. This means you can
now open context menus on touch screens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no way to open context menus on touchscreens Secondary click on mobile
1 participant