Hotkey settings now actually should work.

This commit is contained in:
michael starke
2014-10-28 23:07:57 +01:00
parent 7f242646da
commit 9da60cdaea
14 changed files with 121 additions and 50 deletions

View File

@@ -8,11 +8,26 @@
#import "DDHotKeyCenter.h"
@interface DDHotKey (Keydata)
@interface DDHotKey (MPKeydata)
@property (readonly, copy) NSData *keyData;
+ (instancetype)defaultHotKey;
+ (instancetype)defaultHotKeyWithTask:(DDHotKeyTask)task;
- (NSData *)keyData;
- (instancetype)initWithKeyData:(NSData *)data task:(DDHotKeyTask)task;
- (instancetype)initWithKeyData:(NSData *)data;
@end
@interface DDHotKey (MPValidation)
/*
A hotkey is considered valid, if the key contains at least a modifier and a non-modifier key.
For example Control+Alt is no valid hotkey, as it's missing a non-modifier. Control+Escape however is valid.
@return YES if the hot key is a valid hotkey, NO otherwise
*/
@property (nonatomic, readonly, getter=isValid) BOOL valid;
@end