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

Make it possible to turn off shortcut validation #127

Closed zoul closed 5 years ago

zoul commented 5 years ago

Previously, setting a nil shortcutValidator on MASShortcutView would lead to all shortcuts considered invalid. I think it’s better the other way around, where setting “no validator” means the caller wants no validation done at all.

(I actually have a use case for this. Under normal circumstances, recording keys with no validation doesn’t have much sense, but I use MASShortcutView to record shortcuts that will be used in a different context, in the browser.)