-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add some Keys #5400
base: master
Are you sure you want to change the base?
Add some Keys #5400
Conversation
Preview available at https://egui-pr-preview.github.io/pr/5400-patch150 |
Hey, I'd love this feature. My usecase is having special stuff happen when someone hits the CTRL key. Any hope of getting it merged in? |
crates/egui/src/data/key.rs
Outdated
Alt, | ||
AltRight, | ||
Control, | ||
ControlRight, | ||
Shift, | ||
ShiftRight, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A) it's weird that there is both Alt
and AltRight
, but not AltLeft
B) on the PR preview (https://egui-pr-preview.github.io/pr/5400-patch150/) the Right
versions doesn't work at all.
I think we either should just have a single Alt
, OR we should have AltLeft
and AltRight
, and make sure it works everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, Alt, Ctrl, and Shift basically mean Left.
=> Marked as Left and Right.
logical_key.or(physical_key)
to physical_key.or(logical_key)
This works fine, but I'm not sure if it has any negative effects elsewhere.
This doesn't work at all in the web demo at https://egui-pr-preview.github.io/pr/5400-patch150/: |
Add some Keys :