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
Handling of super key on other platforms #4333
base: master
Are you sure you want to change the base?
Conversation
crates/egui/src/data/input.rs
Outdated
if !cfg!(target_os = "macos") { | ||
return false; | ||
} |
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.
Can't use the compile-time target_os
in egui, since that won't work on wasm32. That's why we have ctx.os()
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.
ctx.os() didn't seem to work here.
Let me check again.
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.
Maybe we don't need this check at all. Let's just define mac_cmd
to mean super
?
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.
Changed to
pub fn mac_cmd_only(&self) -> bool {
self.super_only()
}
Handling of super key on other platforms