aboutsummaryrefslogtreecommitdiffstats
path: root/Framework/MASDictionaryTransformerTests.m
AgeCommit message (Collapse)Author
2015-01-07Better treatment of nil values when storing shortcuts as dictionaries.Tomáš Znamenáček
This makes it possible to make a difference between “shortcut not set, use default” and “shortcut set to none”.
2015-01-07Added Shortcut.h to the tests prefix header to simplify tests.Tomáš Znamenáček
2015-01-07Added a custom transformer to store shortcuts as dictionaries.Tomáš Znamenáček
The MASDictionaryTransformer class is used to save shortcuts to user defaults (and load them back) using a simple dictionary. The value stored in the user defaults looks like this: $ defaults read com.shpakovski.mac.Demo { MASDemoShortcut = { keyCode = 15; modifierFlags = 1048576; }; … } This storage format has got the distinct advantage of being compatible with the format used by Shortcut Recorder. In order to use it, you have to set proper binding options for MASShortcutBinder and the recorder control (MASShortcutView).