extracted MPModifiedKey, fixed autotype obfuscation to correctly use modifiers

This commit is contained in:
michael starke
2017-01-26 12:34:12 +01:00
parent 1bf75fd0b1
commit fef22bce05
9 changed files with 89 additions and 47 deletions

26
MacPass/MPModifiedKey.h Normal file
View File

@@ -0,0 +1,26 @@
//
// MPModifiedKey.h
// MacPass
//
// Created by Michael Starke on 26/01/2017.
// Copyright © 2017 HicknHack Software GmbH. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef struct {
CGEventFlags modifier;
CGKeyCode keyCode;
} MPModifiedKey;
NS_INLINE MPModifiedKey MPMakeModifiedKey(CGEventFlags modifier, CGKeyCode keyCode) {
MPModifiedKey k;
k.keyCode = keyCode;
k.modifier = modifier;
return k;
}
@interface NSValue(NSValueMPModifiedKeyExtensions)
@property (nonatomic, readonly, assign) MPModifiedKey modifiedKeyValue;
+ (instancetype)valueWithModifiedKey:(MPModifiedKey)key;
@end