cocoabits / MASShortcut

Modern framework for managing global keyboard shortcuts compatible with Mac App Store. More details:
http://blog.shpakovski.com/2012/07/global-keyboard-shortcuts-in-cocoa.html
BSD 2-Clause "Simplified" License
1.52k stars 220 forks source link

Allow Option to be used by itself with most keys #10

Closed chendo closed 11 years ago

chendo commented 11 years ago

This PR allows MASShortcut to use more keys for Option-based shortcuts.

shpakovski commented 11 years ago

Sorry, but I believe we should allow only Option+Shift. The keyboard shortcuts for characters like “©£§®” are untouchable. What do you think?

chendo commented 11 years ago

Ahh. Well, I figure if a user sets that as a shortcut, they know what they're getting into. Thoughts? I'm happy with Option+Shift personally as well.

shpakovski commented 11 years ago

Okay Jack, I committed new sources. Now you can add support for both Option and Option+Shift modifiers using API +[MASShortcut setAllowsAnyHotkeyWithOptionModifier:]. I believe this is the safest way to break system bindings if developer really wants to.

chendo commented 11 years ago

Ah cool, a flag works for me. Thanks!

shpakovski commented 11 years ago

Thanks for confirmation and all your help! Have a good day :)