mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 17:19:24 +00:00
Added {CLEARFIELD} to autotype commands. Stubbs for {DELAY X}
This commit is contained in:
25
MacPass/MPAutotypeClear.m
Normal file
25
MacPass/MPAutotypeClear.m
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// MPAutotypeClear.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 20/08/14.
|
||||
// Copyright (c) 2014 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAutotypeClear.h"
|
||||
#import "MPKeyMapper.h"
|
||||
#import <Carbon/Carbon.h>
|
||||
|
||||
@implementation MPAutotypeClear
|
||||
|
||||
- (void)execute {
|
||||
CGKeyCode keyCode = [MPKeyMapper keyCodeForCharacter:@"A"];
|
||||
if(keyCode == kMPUnknownKeyCode) {
|
||||
NSLog(@"Unable to generate key code for 'A'");
|
||||
return;
|
||||
}
|
||||
[self sendPressKey:keyCode modifierFlags:kCGEventFlagMaskCommand];
|
||||
[self sendPressKey:kVK_Delete modifierFlags:0];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user