aboutsummaryrefslogtreecommitdiffstats
path: root/Framework/MASShortcut.m
AgeCommit message (Collapse)Author
2015-01-28Better key equivalent handling on non-ASCII keyboard layouts.Dmitry Obukhov
See #60 for a discussion. In short, keyCodeStringForKeyEquivalent should be now correct even with non-ASCII keyboard layouts such as Russian.
2015-01-07Removed one forgotten modifierFlags setter.Tomáš Znamenáček
It’s not needed now the class is effectively immutable.
2015-01-07Implemented equality for shortcut objects.Tomáš Znamenáček
Shortcuts are equal if and only if their key codes and modifier flags are.
2015-01-07Made the keyCode and modifierFlags properties read-only.Tomáš Znamenáček
A shortcut is a good value type, it makes good sense to represent it using an immutable object like NSNumber or NSString.
2015-01-07Implemented NSCopying for MASShortcut.Tomáš Znamenáček
This makes it possible to use shortcuts as collection keys.
2015-01-07Removed -data and shortcutWithData: from MASShortcut.Tomáš Znamenáček
Using NSKeyedUnarchiver and NSKeyedArchiver directly is almost the same amount of typing and it’s much clearer what goes on.
2015-01-07Trivial refactoring.Tomáš Znamenáček
Forgot one `instancetype`, added `static` to NSString constants, removed unneccessary @synthesize directives.
2015-01-07Introduced `instancetype` return type where appropriate.Tomáš Znamenáček
2015-01-07Introduced a standalone MASShortcutValidator class to validate shortcuts.Tomáš Znamenáček
It’s a natural simplification of the MASShortcut class. All MASShortcutView objects use a shared validator by default, but can be reconfigured to use a different validator if needed through the shortcutValidator property.
2015-01-07Converted keycode macros to plain functions.Tomáš Znamenáček
Plain functions are less prone to bugs, the compiler understands them better and can offer better error messages, and plain functions can be refactored more easily.
2015-01-07Repackaged the code as a framework and included the demo.Tomáš Znamenáček
Packaging the code as a framework is mostly just a formality. It doesn’t really change much, it just turns the code into a regular component. What it does change is that the code now has its own Xcode settings, which could make compatibility easier in the long run. Including the demo in the main repository makes it easier to hack on the library, since you can try the changes immediately. It also shows how to bundle the framework into an app that uses it.