From 72bb0aa6fcdad52edd34a534962a07aef6c4e4fd Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Wed, 12 Sep 2018 12:17:00 +0200 Subject: [PATCH] Removed unused parser context, added minor delay --- MacPass/MPAutotypeCommand.m | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/MacPass/MPAutotypeCommand.m b/MacPass/MPAutotypeCommand.m index afdf9b8c..508009c8 100644 --- a/MacPass/MPAutotypeCommand.m +++ b/MacPass/MPAutotypeCommand.m @@ -88,31 +88,6 @@ static CGKeyCode kMPNumpadKeyCodes[] = { @end -@interface MPAutotypeParserContext : NSObject - -@property (strong) NSMutableArray *commands; -@property (copy) NSString *commandString; -@property (assign) CGEventFlags activeModifiers; -@property (assign) BOOL obfuscate; - -- (instancetype)initWithString:(NSString *)commandString modifiers:(CGEventFlags)modifiers commands:(NSMutableArray *)commands; - -@end - -@implementation MPAutotypeParserContext - -- (instancetype)initWithString:(NSString *)commandString modifiers:(CGEventFlags)modifiers commands:(NSMutableArray *)commands { - self = [super init]; - if(self) { - _commands = commands; - _commandString = [commandString copy]; - _activeModifiers = modifiers; - } - return self; -} - -@end - @implementation MPAutotypeCommand + (NSDictionary *)_keypressCommands { @@ -451,6 +426,7 @@ static CGKeyCode kMPNumpadKeyCodes[] = { CGEventPost(kCGHIDEventTap, pressKey); usleep(0.05 * NSEC_PER_MSEC); CGEventPost(kCGHIDEventTap, releaseKey); + usleep(0.05 * NSEC_PER_MSEC); CFRelease(pressKey); CFRelease(releaseKey);