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

Handling of super key on other platforms #4333

Open
wants to merge 43 commits into
base: master
Choose a base branch
from

Conversation

rustbasic
Copy link
Contributor

@rustbasic rustbasic commented Apr 7, 2024

Handling of super key on other platforms

@rustbasic rustbasic changed the title Handling of super keys on other platforms Handling of super key on other platforms Apr 7, 2024
Comment on lines 681 to 683
if !cfg!(target_os = "macos") {
return false;
}
Copy link
Owner

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()

Copy link
Contributor Author

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.

Copy link
Owner

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?

Copy link
Contributor Author

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()
    }

@rustbasic rustbasic requested a review from emilk April 22, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants