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

add NSMenuItem.key extension #35

Merged
merged 5 commits into from
Apr 6, 2021
Merged

Conversation

DivineDominion
Copy link
Contributor

Closes #32

let keyEquivalent = !self.userKeyEquivalent.isEmpty
? self.userKeyEquivalent
: self.keyEquivalent
return Key(rawValue: keyEquivalent)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DivineDominion I think it's better to initialize the following. What do you think?

return Key(character: keyEquivalent, virtualKeyCode: nil)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure about the consequences, but looks ok!

Copy link
Member

@Econa77 Econa77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Econa77 Econa77 merged commit b0f2963 into Clipy:master Apr 6, 2021
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.

support conversion from NSMenuItem.keyEquivalent to Sauce.Key
2 participants