├── .gitignore ├── DisableKey ├── Resources │ ├── AppIcon.icns │ ├── AppIcon.psd │ ├── StatusItem.pdf │ ├── StatusItem.psd │ └── Makefile ├── main.m ├── Classes │ ├── AppDelegate.h │ ├── EventTap.h │ ├── AppDelegate.m │ └── EventTap.m ├── Base.lproj │ └── MainMenu.xib └── Info.plist ├── README.md ├── Makefile ├── LICENSE └── DisableKey.xcodeproj ├── xcshareddata └── xcschemes │ └── DisableKey.xcscheme └── project.pbxproj /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | project.xcworkspace/ 3 | xcuserdata/ 4 | *-assets/ 5 | build/ 6 | -------------------------------------------------------------------------------- /DisableKey/Resources/AppIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/DisableKey/master/DisableKey/Resources/AppIcon.icns -------------------------------------------------------------------------------- /DisableKey/Resources/AppIcon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/DisableKey/master/DisableKey/Resources/AppIcon.psd -------------------------------------------------------------------------------- /DisableKey/Resources/StatusItem.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/DisableKey/master/DisableKey/Resources/StatusItem.pdf -------------------------------------------------------------------------------- /DisableKey/Resources/StatusItem.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/DisableKey/master/DisableKey/Resources/StatusItem.psd -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DisableKey 2 | ========== 3 | 4 | Disable key inputs from the internal keyboard, for cleaning it or some other purposes. 5 | -------------------------------------------------------------------------------- /DisableKey/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DisableKey 4 | // 5 | // Created by Yoshimasa Niwa on 2/26/18. 6 | // Copyright © 2018 Yoshimasa Niwa. All rights reserved. 7 | // 8 | 9 | @import AppKit; 10 | 11 | int main(int argc, const char * argv[]) 12 | { 13 | return NSApplicationMain(argc, argv); 14 | } 15 | -------------------------------------------------------------------------------- /DisableKey/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DisableKey 4 | // 5 | // Created by Yoshimasa Niwa on 2/26/18. 6 | // Copyright © 2018 Yoshimasa Niwa. All rights reserved. 7 | // 8 | 9 | @import AppKit; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface AppDelegate : NSObject 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /DisableKey/Resources/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean 2 | 3 | BASE_NAME = AppIcon 4 | GENERATOR_PATH = $(BASE_NAME)-assets 5 | ICNS_NAME = $(BASE_NAME).icns 6 | ICONSET_NAME = $(BASE_NAME).iconset 7 | 8 | TARGET = $(ICNS_NAME) 9 | ICONSET_PATH = $(GENERATOR_PATH)/$(ICONSET_NAME) 10 | 11 | all: $(TARGET) 12 | 13 | clean: 14 | rm -f $(TARGET) 15 | 16 | $(TARGET): $(ICONSET_PATH) \ 17 | $(ICONSET_PATH)/icon_16x16.png \ 18 | $(ICONSET_PATH)/icon_16x16@2x.png \ 19 | $(ICONSET_PATH)/icon_32x32.png \ 20 | $(ICONSET_PATH)/icon_32x32@2x.png \ 21 | $(ICONSET_PATH)/icon_128x128.png \ 22 | $(ICONSET_PATH)/icon_128x128@2x.png \ 23 | $(ICONSET_PATH)/icon_256x256.png \ 24 | $(ICONSET_PATH)/icon_256x256@2x.png \ 25 | $(ICONSET_PATH)/icon_512x512.png \ 26 | $(ICONSET_PATH)/icon_512x512@2x.png 27 | iconutil --convert icns -o $@ $< 28 | 29 | -------------------------------------------------------------------------------- /DisableKey/Classes/EventTap.h: -------------------------------------------------------------------------------- 1 | // 2 | // EventTap.h 3 | // DisableKey 4 | // 5 | // Created by Yoshimasa Niwa on 2/26/18. 6 | // Copyright © 2017 Yoshimasa Niwa. All rights reserved. 7 | // 8 | 9 | @import AppKit; 10 | @import Foundation; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @class EventTap; 15 | 16 | @protocol EventTapDelegate 17 | 18 | @optional 19 | - (CGEventRef)eventTap:(EventTap *)eventTap didTapEvent:(CGEventRef)event; 20 | - (void)eventTapDisabled:(EventTap *)eventTap; 21 | 22 | @end 23 | 24 | @interface EventTap : NSObject 25 | 26 | @property (nonatomic, weak, nullable) id delegate; 27 | @property (nonatomic, readonly) CGEventMask eventMask; 28 | @property (nonatomic, getter=isEnabled) BOOL enabled; 29 | 30 | - (instancetype)initWithEventMask:(CGEventMask)eventMask NS_DESIGNATED_INITIALIZER; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /DisableKey/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | NAME = DisableKey 2 | 3 | BUILD_PATH = build 4 | 5 | XCODE_PROJECT_PATH = $(NAME).xcodeproj 6 | XCODE_SCHEME = $(NAME) 7 | XCODE_ARCHIVE_PATH = $(BUILD_PATH)/$(NAME).xcarchive 8 | XCODE_ARCHIVE_BUNDLE_PATH = $(XCODE_ARCHIVE_PATH)/Products/Applications/$(NAME).app 9 | 10 | TARGET_PATH = $(XCODE_ARCHIVE_BUNDLE_PATH) 11 | 12 | ARCHIVE_PATH = $(BUILD_PATH)/$(NAME).app.zip 13 | 14 | .PHONY: all 15 | all: $(ARCHIVE_PATH) 16 | 17 | .PHONY: claen 18 | clean: 19 | git clean -dfX 20 | 21 | $(XCODE_ARCHIVE_BUNDLE_PATH): 22 | xcodebuild \ 23 | -project "$(XCODE_PROJECT_PATH)" \ 24 | -scheme "$(XCODE_SCHEME)" \ 25 | -derivedDataPath "$(BUILD_PATH)" \ 26 | -archivePath "$(XCODE_ARCHIVE_PATH)" \ 27 | archive 28 | 29 | # Use `xcodebuild -exportArchive` to sign archive. 30 | # For now, we don't sign archive so directly using archive bundle. 31 | #$(TARGET_PATH): $(XCODE_ARCHIVE_BUNDLE_PATH) 32 | # xcodebuild \ 33 | # -exportArchive \ 34 | # ... 35 | 36 | $(ARCHIVE_PATH): $(TARGET_PATH) 37 | ditto -c -k --sequesterRsrc --keepParent $< $@ 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Yoshimasa Niwa 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /DisableKey/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | AppIcon.icns 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 0.1.1 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | LSUIElement 26 | 27 | NSHumanReadableCopyright 28 | Copyright © 2018 Yoshimasa Niwa. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /DisableKey/Classes/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // DisableKey 4 | // 5 | // Created by Yoshimasa Niwa on 2/26/18. 6 | // Copyright © 2018 Yoshimasa Niwa. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "EventTap.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | static int64_t kInternalKeyboardType = 58; 15 | 16 | @interface AppDelegate () 17 | 18 | @property (nonatomic, nullable) NSStatusItem *statusItem; 19 | @property (nonatomic, nullable) EventTap *eventTap; 20 | 21 | @end 22 | 23 | @implementation AppDelegate 24 | 25 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 26 | { 27 | NSStatusBar * const statusBar = [NSStatusBar systemStatusBar]; 28 | NSStatusItem * const statusItem = [statusBar statusItemWithLength:NSVariableStatusItemLength]; 29 | statusItem.highlightMode = YES; 30 | 31 | NSImage * const statusItemImage = [NSImage imageNamed:@"StatusItem"]; 32 | statusItemImage.template = YES; 33 | statusItem.image = statusItemImage; 34 | 35 | NSMenu * const statusMenu = [[NSMenu alloc] init]; 36 | 37 | NSMenuItem * const quitMenuItem = [[NSMenuItem alloc] init]; 38 | quitMenuItem.title = @"Quit"; 39 | quitMenuItem.keyEquivalent = @"q"; 40 | quitMenuItem.keyEquivalentModifierMask = NSEventModifierFlagCommand; 41 | quitMenuItem.action = @selector(terminate:); 42 | [statusMenu addItem:quitMenuItem]; 43 | 44 | statusItem.menu = statusMenu; 45 | 46 | self.statusItem = statusItem; 47 | 48 | CFDictionaryRef options = (__bridge CFDictionaryRef)@{(__bridge NSString *)kAXTrustedCheckOptionPrompt: @YES}; 49 | if (AXIsProcessTrustedWithOptions(options)) { 50 | const CGEventMask eventMask = CGEventMaskBit(kCGEventKeyDown) | CGEventMaskBit(kCGEventKeyUp) | CGEventMaskBit(kCGEventFlagsChanged); 51 | EventTap * const eventTap = [[EventTap alloc] initWithEventMask:eventMask]; 52 | eventTap.delegate = self; 53 | eventTap.enabled = YES; 54 | self.eventTap = eventTap; 55 | } 56 | } 57 | 58 | // MARK: - EventTapDelegate 59 | 60 | - (CGEventRef)eventTap:(EventTap *)eventTap didTapEvent:(CGEventRef)event 61 | { 62 | const int64_t keyboardType = CGEventGetIntegerValueField(event, kCGKeyboardEventKeyboardType); 63 | if (keyboardType == kInternalKeyboardType) { 64 | return NULL; 65 | } else { 66 | return event; 67 | } 68 | } 69 | 70 | @end 71 | 72 | NS_ASSUME_NONNULL_END 73 | -------------------------------------------------------------------------------- /DisableKey/Classes/EventTap.m: -------------------------------------------------------------------------------- 1 | // 2 | // EventTap.m 3 | // DisableKey 4 | // 5 | // Created by Yoshimasa Niwa on 2/26/18. 6 | // Copyright © 2017 Yoshimasa Niwa. All rights reserved. 7 | // 8 | 9 | #import "EventTap.h" 10 | 11 | @import os.log; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | static CGEventRef EventTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void * _Nullable userInfo) 16 | { 17 | @autoreleasepool { 18 | EventTap * const eventTap = (__bridge EventTap *)userInfo; 19 | 20 | switch (type) { 21 | case kCGEventTapDisabledByTimeout: 22 | case kCGEventTapDisabledByUserInput: { 23 | eventTap.enabled = NO; 24 | 25 | os_log_error(OS_LOG_DEFAULT, "Event tap disabled by type: %d", type); 26 | 27 | id const delegate = eventTap.delegate; 28 | if ([delegate respondsToSelector:@selector(eventTapDisabled:)]) { 29 | [delegate eventTapDisabled:eventTap]; 30 | } 31 | break; 32 | } 33 | default: { 34 | id const delegate = eventTap.delegate; 35 | if ([delegate respondsToSelector:@selector(eventTap:didTapEvent:)]) { 36 | return [delegate eventTap:eventTap didTapEvent:event]; 37 | } 38 | break; 39 | } 40 | } 41 | 42 | return event; 43 | } 44 | } 45 | 46 | @implementation EventTap 47 | { 48 | CFMachPortRef _eventTap; 49 | CFRunLoopSourceRef _runLoopSource; 50 | } 51 | 52 | - (instancetype)init 53 | { 54 | return [self initWithEventMask:kCGEventMaskForAllEvents]; 55 | } 56 | 57 | - (instancetype)initWithEventMask:(CGEventMask)eventMask 58 | { 59 | if (self = [super init]) { 60 | _eventMask = eventMask; 61 | } 62 | return self; 63 | } 64 | 65 | - (void)dealloc 66 | { 67 | [self _main_disable]; 68 | } 69 | 70 | - (void)setEnabled:(BOOL)enabled 71 | { 72 | if (_enabled != enabled) { 73 | if (enabled) { 74 | [self _main_enable]; 75 | } else { 76 | [self _main_disable]; 77 | } 78 | } 79 | } 80 | 81 | - (void)_main_enable 82 | { 83 | if (_eventTap) { 84 | return; 85 | } 86 | if (_runLoopSource) { 87 | return; 88 | } 89 | 90 | _eventTap = CGEventTapCreate(kCGSessionEventTap, kCGHeadInsertEventTap, 0, self.eventMask, EventTapCallback, (__bridge void *)self); 91 | if (_eventTap) { 92 | _runLoopSource = CFMachPortCreateRunLoopSource(kCFAllocatorDefault, _eventTap, 0); 93 | if (_runLoopSource) { 94 | CFRunLoopAddSource(CFRunLoopGetMain(), _runLoopSource, kCFRunLoopCommonModes); 95 | CGEventTapEnable(_eventTap, true); 96 | 97 | os_log_info(OS_LOG_DEFAULT, "Event tap enabled: %p", _eventTap); 98 | 99 | _enabled = YES; 100 | } else { 101 | CFRelease(_eventTap); 102 | _eventTap = NULL; 103 | } 104 | } 105 | } 106 | 107 | - (void)_main_disable 108 | { 109 | if (_runLoopSource) { 110 | CFRunLoopRemoveSource(CFRunLoopGetMain(), _runLoopSource, kCFRunLoopCommonModes); 111 | CFRelease(_runLoopSource); 112 | _runLoopSource = NULL; 113 | } 114 | if (_eventTap) { 115 | CGEventTapEnable(_eventTap, false); 116 | 117 | os_log_info(OS_LOG_DEFAULT, "Event tap disabled: %p", _eventTap); 118 | 119 | CFRelease(_eventTap); 120 | _eventTap = NULL; 121 | } 122 | 123 | _enabled = NO; 124 | } 125 | 126 | @end 127 | 128 | NS_ASSUME_NONNULL_END 129 | -------------------------------------------------------------------------------- /DisableKey.xcodeproj/xcshareddata/xcschemes/DisableKey.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /DisableKey.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 54A15D8C2073FE7600D0DCD5 /* AppIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 54A15D8B2073FE7600D0DCD5 /* AppIcon.icns */; }; 11 | 54CFE8C32044720A007C3F76 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 54CFE8C22044720A007C3F76 /* AppDelegate.m */; }; 12 | 54CFE8C82044720A007C3F76 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 54CFE8C62044720A007C3F76 /* MainMenu.xib */; }; 13 | 54CFE8CB2044720A007C3F76 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 54CFE8CA2044720A007C3F76 /* main.m */; }; 14 | 54CFE8D4204472CC007C3F76 /* EventTap.m in Sources */ = {isa = PBXBuildFile; fileRef = 54CFE8D3204472CC007C3F76 /* EventTap.m */; }; 15 | 54CFE8D62044747D007C3F76 /* StatusItem.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 54CFE8D52044747D007C3F76 /* StatusItem.pdf */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 54A15D8B2073FE7600D0DCD5 /* AppIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = AppIcon.icns; sourceTree = ""; }; 20 | 54CFE8BE2044720A007C3F76 /* DisableKey.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DisableKey.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 54CFE8C12044720A007C3F76 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 22 | 54CFE8C22044720A007C3F76 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 23 | 54CFE8C72044720A007C3F76 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 24 | 54CFE8C92044720A007C3F76 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 25 | 54CFE8CA2044720A007C3F76 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 26 | 54CFE8D2204472CC007C3F76 /* EventTap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTap.h; sourceTree = ""; }; 27 | 54CFE8D3204472CC007C3F76 /* EventTap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EventTap.m; sourceTree = ""; }; 28 | 54CFE8D52044747D007C3F76 /* StatusItem.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = StatusItem.pdf; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 54CFE8BB2044720A007C3F76 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | 545435BE20449AA500FCADC4 /* Classes */ = { 43 | isa = PBXGroup; 44 | children = ( 45 | 54CFE8C12044720A007C3F76 /* AppDelegate.h */, 46 | 54CFE8C22044720A007C3F76 /* AppDelegate.m */, 47 | 54CFE8D2204472CC007C3F76 /* EventTap.h */, 48 | 54CFE8D3204472CC007C3F76 /* EventTap.m */, 49 | ); 50 | path = Classes; 51 | sourceTree = ""; 52 | }; 53 | 545435BF20449AB100FCADC4 /* Resources */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 54A15D8B2073FE7600D0DCD5 /* AppIcon.icns */, 57 | 54CFE8D52044747D007C3F76 /* StatusItem.pdf */, 58 | ); 59 | path = Resources; 60 | sourceTree = ""; 61 | }; 62 | 54CFE8B52044720A007C3F76 = { 63 | isa = PBXGroup; 64 | children = ( 65 | 54CFE8C02044720A007C3F76 /* DisableKey */, 66 | 54CFE8BF2044720A007C3F76 /* Products */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | 54CFE8BF2044720A007C3F76 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 54CFE8BE2044720A007C3F76 /* DisableKey.app */, 74 | ); 75 | name = Products; 76 | sourceTree = ""; 77 | }; 78 | 54CFE8C02044720A007C3F76 /* DisableKey */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 545435BE20449AA500FCADC4 /* Classes */, 82 | 54CFE8C92044720A007C3F76 /* Info.plist */, 83 | 54CFE8CA2044720A007C3F76 /* main.m */, 84 | 54CFE8C62044720A007C3F76 /* MainMenu.xib */, 85 | 545435BF20449AB100FCADC4 /* Resources */, 86 | ); 87 | path = DisableKey; 88 | sourceTree = ""; 89 | }; 90 | /* End PBXGroup section */ 91 | 92 | /* Begin PBXNativeTarget section */ 93 | 54CFE8BD2044720A007C3F76 /* DisableKey */ = { 94 | isa = PBXNativeTarget; 95 | buildConfigurationList = 54CFE8CF2044720A007C3F76 /* Build configuration list for PBXNativeTarget "DisableKey" */; 96 | buildPhases = ( 97 | 54CFE8BA2044720A007C3F76 /* Sources */, 98 | 54CFE8BB2044720A007C3F76 /* Frameworks */, 99 | 54CFE8BC2044720A007C3F76 /* Resources */, 100 | ); 101 | buildRules = ( 102 | ); 103 | dependencies = ( 104 | ); 105 | name = DisableKey; 106 | productName = DisableKey; 107 | productReference = 54CFE8BE2044720A007C3F76 /* DisableKey.app */; 108 | productType = "com.apple.product-type.application"; 109 | }; 110 | /* End PBXNativeTarget section */ 111 | 112 | /* Begin PBXProject section */ 113 | 54CFE8B62044720A007C3F76 /* Project object */ = { 114 | isa = PBXProject; 115 | attributes = { 116 | LastUpgradeCheck = 0920; 117 | ORGANIZATIONNAME = "Yoshimasa Niwa"; 118 | TargetAttributes = { 119 | 54CFE8BD2044720A007C3F76 = { 120 | CreatedOnToolsVersion = 9.2; 121 | }; 122 | }; 123 | }; 124 | buildConfigurationList = 54CFE8B92044720A007C3F76 /* Build configuration list for PBXProject "DisableKey" */; 125 | compatibilityVersion = "Xcode 8.0"; 126 | developmentRegion = en; 127 | hasScannedForEncodings = 0; 128 | knownRegions = ( 129 | en, 130 | Base, 131 | ); 132 | mainGroup = 54CFE8B52044720A007C3F76; 133 | productRefGroup = 54CFE8BF2044720A007C3F76 /* Products */; 134 | projectDirPath = ""; 135 | projectRoot = ""; 136 | targets = ( 137 | 54CFE8BD2044720A007C3F76 /* DisableKey */, 138 | ); 139 | }; 140 | /* End PBXProject section */ 141 | 142 | /* Begin PBXResourcesBuildPhase section */ 143 | 54CFE8BC2044720A007C3F76 /* Resources */ = { 144 | isa = PBXResourcesBuildPhase; 145 | buildActionMask = 2147483647; 146 | files = ( 147 | 54CFE8D62044747D007C3F76 /* StatusItem.pdf in Resources */, 148 | 54CFE8C82044720A007C3F76 /* MainMenu.xib in Resources */, 149 | 54A15D8C2073FE7600D0DCD5 /* AppIcon.icns in Resources */, 150 | ); 151 | runOnlyForDeploymentPostprocessing = 0; 152 | }; 153 | /* End PBXResourcesBuildPhase section */ 154 | 155 | /* Begin PBXSourcesBuildPhase section */ 156 | 54CFE8BA2044720A007C3F76 /* Sources */ = { 157 | isa = PBXSourcesBuildPhase; 158 | buildActionMask = 2147483647; 159 | files = ( 160 | 54CFE8D4204472CC007C3F76 /* EventTap.m in Sources */, 161 | 54CFE8CB2044720A007C3F76 /* main.m in Sources */, 162 | 54CFE8C32044720A007C3F76 /* AppDelegate.m in Sources */, 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXSourcesBuildPhase section */ 167 | 168 | /* Begin PBXVariantGroup section */ 169 | 54CFE8C62044720A007C3F76 /* MainMenu.xib */ = { 170 | isa = PBXVariantGroup; 171 | children = ( 172 | 54CFE8C72044720A007C3F76 /* Base */, 173 | ); 174 | name = MainMenu.xib; 175 | sourceTree = ""; 176 | }; 177 | /* End PBXVariantGroup section */ 178 | 179 | /* Begin XCBuildConfiguration section */ 180 | 54CFE8CD2044720A007C3F76 /* Debug */ = { 181 | isa = XCBuildConfiguration; 182 | buildSettings = { 183 | ALWAYS_SEARCH_USER_PATHS = NO; 184 | CLANG_ANALYZER_NONNULL = YES; 185 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 186 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 187 | CLANG_CXX_LIBRARY = "libc++"; 188 | CLANG_ENABLE_MODULES = YES; 189 | CLANG_ENABLE_OBJC_ARC = YES; 190 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 191 | CLANG_WARN_BOOL_CONVERSION = YES; 192 | CLANG_WARN_COMMA = YES; 193 | CLANG_WARN_CONSTANT_CONVERSION = YES; 194 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 195 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 196 | CLANG_WARN_EMPTY_BODY = YES; 197 | CLANG_WARN_ENUM_CONVERSION = YES; 198 | CLANG_WARN_INFINITE_RECURSION = YES; 199 | CLANG_WARN_INT_CONVERSION = YES; 200 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 201 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 202 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 203 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 204 | CLANG_WARN_STRICT_PROTOTYPES = YES; 205 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 206 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 207 | CLANG_WARN_UNREACHABLE_CODE = YES; 208 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 209 | COPY_PHASE_STRIP = NO; 210 | DEBUG_INFORMATION_FORMAT = dwarf; 211 | ENABLE_STRICT_OBJC_MSGSEND = YES; 212 | ENABLE_TESTABILITY = YES; 213 | GCC_C_LANGUAGE_STANDARD = gnu11; 214 | GCC_DYNAMIC_NO_PIC = NO; 215 | GCC_NO_COMMON_BLOCKS = YES; 216 | GCC_OPTIMIZATION_LEVEL = 0; 217 | GCC_PREPROCESSOR_DEFINITIONS = ( 218 | "DEBUG=1", 219 | "$(inherited)", 220 | ); 221 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 222 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 223 | GCC_WARN_UNDECLARED_SELECTOR = YES; 224 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 225 | GCC_WARN_UNUSED_FUNCTION = YES; 226 | GCC_WARN_UNUSED_VARIABLE = YES; 227 | MACOSX_DEPLOYMENT_TARGET = 10.12; 228 | MTL_ENABLE_DEBUG_INFO = YES; 229 | ONLY_ACTIVE_ARCH = YES; 230 | SDKROOT = macosx; 231 | }; 232 | name = Debug; 233 | }; 234 | 54CFE8CE2044720A007C3F76 /* Release */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 240 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 241 | CLANG_CXX_LIBRARY = "libc++"; 242 | CLANG_ENABLE_MODULES = YES; 243 | CLANG_ENABLE_OBJC_ARC = YES; 244 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 245 | CLANG_WARN_BOOL_CONVERSION = YES; 246 | CLANG_WARN_COMMA = YES; 247 | CLANG_WARN_CONSTANT_CONVERSION = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 250 | CLANG_WARN_EMPTY_BODY = YES; 251 | CLANG_WARN_ENUM_CONVERSION = YES; 252 | CLANG_WARN_INFINITE_RECURSION = YES; 253 | CLANG_WARN_INT_CONVERSION = YES; 254 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 261 | CLANG_WARN_UNREACHABLE_CODE = YES; 262 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu11; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | MACOSX_DEPLOYMENT_TARGET = 10.12; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = macosx; 278 | }; 279 | name = Release; 280 | }; 281 | 54CFE8D02044720A007C3F76 /* Debug */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 285 | COMBINE_HIDPI_IMAGES = YES; 286 | INFOPLIST_FILE = DisableKey/Info.plist; 287 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 288 | PRODUCT_BUNDLE_IDENTIFIER = at.niw.DisableKey; 289 | PRODUCT_NAME = "$(TARGET_NAME)"; 290 | }; 291 | name = Debug; 292 | }; 293 | 54CFE8D12044720A007C3F76 /* Release */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 297 | COMBINE_HIDPI_IMAGES = YES; 298 | INFOPLIST_FILE = DisableKey/Info.plist; 299 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 300 | PRODUCT_BUNDLE_IDENTIFIER = at.niw.DisableKey; 301 | PRODUCT_NAME = "$(TARGET_NAME)"; 302 | }; 303 | name = Release; 304 | }; 305 | /* End XCBuildConfiguration section */ 306 | 307 | /* Begin XCConfigurationList section */ 308 | 54CFE8B92044720A007C3F76 /* Build configuration list for PBXProject "DisableKey" */ = { 309 | isa = XCConfigurationList; 310 | buildConfigurations = ( 311 | 54CFE8CD2044720A007C3F76 /* Debug */, 312 | 54CFE8CE2044720A007C3F76 /* Release */, 313 | ); 314 | defaultConfigurationIsVisible = 0; 315 | defaultConfigurationName = Release; 316 | }; 317 | 54CFE8CF2044720A007C3F76 /* Build configuration list for PBXNativeTarget "DisableKey" */ = { 318 | isa = XCConfigurationList; 319 | buildConfigurations = ( 320 | 54CFE8D02044720A007C3F76 /* Debug */, 321 | 54CFE8D12044720A007C3F76 /* Release */, 322 | ); 323 | defaultConfigurationIsVisible = 0; 324 | defaultConfigurationName = Release; 325 | }; 326 | /* End XCConfigurationList section */ 327 | }; 328 | rootObject = 54CFE8B62044720A007C3F76 /* Project object */; 329 | } 330 | --------------------------------------------------------------------------------