mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 22:09:25 +00:00
extracted MPModifiedKey, fixed autotype obfuscation to correctly use modifiers
This commit is contained in:
26
MacPass/MPModifiedKey.h
Normal file
26
MacPass/MPModifiedKey.h
Normal 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
|
||||
Reference in New Issue
Block a user