Autotype now uses key presses instead of paste whenever possible.

This commit is contained in:
Michael Starke
2018-11-05 11:55:07 +01:00
parent 57e28e1417
commit afc69f69ae
18 changed files with 1008 additions and 521 deletions

View File

@@ -22,6 +22,8 @@
#import <Foundation/Foundation.h>
FOUNDATION_EXTERN uint16_t const kMPUnknownKeyCode;
typedef struct {
CGEventFlags modifier;
CGKeyCode keyCode;
@@ -34,6 +36,10 @@ NS_INLINE MPModifiedKey MPMakeModifiedKey(CGEventFlags modifier, CGKeyCode keyCo
return k;
}
NS_INLINE BOOL MPIsValidModifiedKey(MPModifiedKey k) {
return (k.keyCode == kMPUnknownKeyCode);
}
@interface NSValue(NSValueMPModifiedKeyExtensions)
@property (nonatomic, readonly, assign) MPModifiedKey modifiedKeyValue;
+ (instancetype)valueWithModifiedKey:(MPModifiedKey)key;