Commits

mtchavez committed 4b4dcec

Getting Release Build to work.
* Moved NDHotKeys back into ThirdParty folder.
* Remove Sparkle.framework for now. Has issues with XML on 10.8 and array sorter using function.
* Set Cog project to build in 32-bit mode so MADDecoder can read MP3 files correctly.

Comments (0)

Files changed (32)

Cog.xcodeproj/project.pbxproj

 		17A8F6860D6A7FCA0095DA13 /* repeat_none.png in Resources */ = {isa = PBXBuildFile; fileRef = 17A8F6830D6A7FCA0095DA13 /* repeat_none.png */; };
 		17A8F6870D6A7FCA0095DA13 /* repeat_one.png in Resources */ = {isa = PBXBuildFile; fileRef = 17A8F6840D6A7FCA0095DA13 /* repeat_one.png */; };
 		17A8F71A0D6A89730095DA13 /* repeat_album.png in Resources */ = {isa = PBXBuildFile; fileRef = 17A8F7190D6A89730095DA13 /* repeat_album.png */; };
-		17B6FA7F0D48225300C3BEF1 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17BF2B270CDD77EB007E1295 /* Sparkle.framework */; };
 		17B7CF5C0F5A05EE00A47027 /* pauseBadge.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B7CF590F5A05EE00A47027 /* pauseBadge.png */; };
 		17B7CF5D0F5A05EE00A47027 /* playBadge.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B7CF5A0F5A05EE00A47027 /* playBadge.png */; };
 		17B7CF5E0F5A05EE00A47027 /* stopBadge.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B7CF5B0F5A05EE00A47027 /* stopBadge.png */; };
 		17BB5CFA0B8A86350009ACB1 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17BB5CF70B8A86350009ACB1 /* CoreAudio.framework */; };
 		17BB5CFB0B8A86350009ACB1 /* CoreAudioKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17BB5CF80B8A86350009ACB1 /* CoreAudioKit.framework */; };
 		17BB5EA60B8A87850009ACB1 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17BB5EA50B8A87850009ACB1 /* IOKit.framework */; };
-		17BF2B280CDD7802007E1295 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17BF2B270CDD77EB007E1295 /* Sparkle.framework */; };
 		17C809910C3BD201005707C4 /* WavPack.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808C80C3BD1DD005707C4 /* WavPack.bundle */; };
 		17C809920C3BD206005707C4 /* Vorbis.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808BF0C3BD1D2005707C4 /* Vorbis.bundle */; };
 		17C809930C3BD21D005707C4 /* TagLib.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808B60C3BD1C5005707C4 /* TagLib.bundle */; };
 		8E9A30160BA792DC0091081B /* NSFileHandle+CreateFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E9A30140BA792DC0091081B /* NSFileHandle+CreateFile.m */; };
 		99EAACA80DD1BB7A00423C38 /* APL.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 566D321B0D538550004466A5 /* APL.bundle */; };
 		B09E96630D74A7BC0064F138 /* stop_current.png in Resources */ = {isa = PBXBuildFile; fileRef = B09E96620D74A7BC0064F138 /* stop_current.png */; };
-		CDD1B67C15EDB9C000885EEA /* NDHotKey.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDD1B4B515E96F3900885EEA /* NDHotKey.framework */; };
-		CDD1B67D15EDBA8000885EEA /* NDHotKey.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CDD1B4B515E96F3900885EEA /* NDHotKey.framework */; };
 		CDD1B68415EDBBA300885EEA /* NDHotKeyControl.m in Sources */ = {isa = PBXBuildFile; fileRef = CDD1B68115EDBBA300885EEA /* NDHotKeyControl.m */; };
 		CDD1B68515EDBBA300885EEA /* NDHotKeyEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = CDD1B68215EDBBA300885EEA /* NDHotKeyEvent.m */; };
 		CDD1B68615EDBBA300885EEA /* NDKeyboardLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = CDD1B68315EDBBA300885EEA /* NDKeyboardLayout.m */; };
 			remoteGlobalIDString = 8D5B49AC048680CD000E48DA;
 			remoteInfo = "AudioOverload Plugin";
 		};
-		17BF2B260CDD77EB007E1295 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 17BF2B1F0CDD77EB007E1295 /* Sparkle.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
-			remoteInfo = Sparkle;
-		};
-		17BF2B390CDD7827007E1295 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 17BF2B1F0CDD77EB007E1295 /* Sparkle.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
-			remoteInfo = Sparkle;
-		};
 		17C808780C3BD167005707C4 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 17C808710C3BD167005707C4 /* FileSource.xcodeproj */;
 			remoteGlobalIDString = 8D5B49B6048680CD000E48DA;
 			remoteInfo = WMA;
 		};
-		CDD1B4B415E96F3900885EEA /* PBXContainerItemProxy */ = {
+		CDD1B74015EDDB5C00885EEA /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = CDD1B4AD15E96F3900885EEA /* NDHotKey.xcodeproj */;
 			proxyType = 2;
 			remoteGlobalIDString = 32F1615614E6BB3B00D6AB2F;
 			remoteInfo = NDHotKey;
 		};
-		CDD1B55215E972F100885EEA /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = CDD1B4AD15E96F3900885EEA /* NDHotKey.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 32F1615514E6BB3B00D6AB2F;
-			remoteInfo = NDHotKey;
-		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXCopyFilesBuildPhase section */
 			dstPath = "";
 			dstSubfolderSpec = 10;
 			files = (
-				CDD1B67D15EDBA8000885EEA /* NDHotKey.framework in CopyFiles */,
-				17B6FA7F0D48225300C3BEF1 /* Sparkle.framework in CopyFiles */,
 				17F561400C3BD4F30019975C /* CogAudio.framework in CopyFiles */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		17BB5CF70B8A86350009ACB1 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
 		17BB5CF80B8A86350009ACB1 /* CoreAudioKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioKit.framework; path = /System/Library/Frameworks/CoreAudioKit.framework; sourceTree = "<absolute>"; };
 		17BB5EA50B8A87850009ACB1 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
-		17BF2B1F0CDD77EB007E1295 /* Sparkle.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Sparkle.xcodeproj; path = Frameworks/Sparkle/Sparkle.xcodeproj; sourceTree = "<group>"; };
 		17C808660C3BD0F8005707C4 /* CoreAudio.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CoreAudio.xcodeproj; path = Plugins/CoreAudio/CoreAudio.xcodeproj; sourceTree = SOURCE_ROOT; };
 		17C808710C3BD167005707C4 /* FileSource.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FileSource.xcodeproj; path = Plugins/FileSource/FileSource.xcodeproj; sourceTree = "<group>"; };
 		17C8087A0C3BD173005707C4 /* Flac.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Flac.xcodeproj; path = Plugins/Flac/Flac.xcodeproj; sourceTree = "<group>"; };
 		8E9A30140BA792DC0091081B /* NSFileHandle+CreateFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSFileHandle+CreateFile.m"; sourceTree = "<group>"; };
 		B09E94300D747F7B0064F138 /* WMA.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = WMA.xcodeproj; path = Plugins/WMA/WMA.xcodeproj; sourceTree = "<group>"; };
 		B09E96620D74A7BC0064F138 /* stop_current.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stop_current.png; path = Images/stop_current.png; sourceTree = "<group>"; };
-		CDD1B4AD15E96F3900885EEA /* NDHotKey.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = NDHotKey.xcodeproj; path = Frameworks/NDHotKey/NDHotKey.xcodeproj; sourceTree = "<group>"; };
+		CDD1B4AD15E96F3900885EEA /* NDHotKey.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = NDHotKey.xcodeproj; path = ThirdParty/NDHotKey/NDHotKey.xcodeproj; sourceTree = "<group>"; };
 		CDD1B67E15EDBBA300885EEA /* NDHotKeyControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NDHotKeyControl.h; sourceTree = "<group>"; };
 		CDD1B67F15EDBBA300885EEA /* NDHotKeyEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NDHotKeyEvent.h; sourceTree = "<group>"; };
 		CDD1B68015EDBBA300885EEA /* NDKeyboardLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NDKeyboardLayout.h; sourceTree = "<group>"; };
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CDD1B67C15EDB9C000885EEA /* NDHotKey.framework in Frameworks */,
-				17BF2B280CDD7802007E1295 /* Sparkle.framework in Frameworks */,
 				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
 				8E6889240AAA403C00AD3950 /* Carbon.framework in Frameworks */,
 				17BB5CED0B8A86010009ACB1 /* AudioToolbox.framework in Frameworks */,
 		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
 			isa = PBXGroup;
 			children = (
-				17BF2B1F0CDD77EB007E1295 /* Sparkle.xcodeproj */,
 				CDD1B4AD15E96F3900885EEA /* NDHotKey.xcodeproj */,
 				17F5612A0C3BD4DC0019975C /* CogAudio.xcodeproj */,
 				8E6889230AAA403C00AD3950 /* Carbon.framework */,
 			name = Products;
 			sourceTree = "<group>";
 		};
-		17BF2B200CDD77EB007E1295 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				17BF2B270CDD77EB007E1295 /* Sparkle.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
 		17C808720C3BD167005707C4 /* Products */ = {
 			isa = PBXGroup;
 			children = (
 			name = Products;
 			sourceTree = "<group>";
 		};
-		CDD1B4AE15E96F3900885EEA /* Products */ = {
+		CDD1B73D15EDDB5C00885EEA /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				CDD1B4B515E96F3900885EEA /* NDHotKey.framework */,
+				CDD1B74115EDDB5C00885EEA /* NDHotKey.framework */,
 			);
 			name = Products;
 			sourceTree = "<group>";
 			buildRules = (
 			);
 			dependencies = (
-				CDD1B55315E972F100885EEA /* PBXTargetDependency */,
 				17C8097E0C3BD1F5005707C4 /* PBXTargetDependency */,
 				17C809800C3BD1F5005707C4 /* PBXTargetDependency */,
 				17C809820C3BD1F5005707C4 /* PBXTargetDependency */,
 				17F3BB8B0CBC566200864489 /* PBXTargetDependency */,
 				17C8F44C0CBEDD37008D969D /* PBXTargetDependency */,
 				17C8F7DA0CBEF3F9008D969D /* PBXTargetDependency */,
-				17BF2B3A0CDD7827007E1295 /* PBXTargetDependency */,
 				17643CBC0D5BD44900F0A9FE /* PBXTargetDependency */,
 				17B7CF960F5A0A3700A47027 /* PBXTargetDependency */,
 			);
 				Hebrew,
 				Greek,
 				zh_CN,
+				en,
 			);
 			mainGroup = 29B97314FDCFA39411CA2CEA /* Cog */;
 			projectDirPath = "";
 					ProjectRef = 17C8089E0C3BD1AB005707C4 /* Musepack.xcodeproj */;
 				},
 				{
-					ProductGroup = CDD1B4AE15E96F3900885EEA /* Products */;
+					ProductGroup = CDD1B73D15EDDB5C00885EEA /* Products */;
 					ProjectRef = CDD1B4AD15E96F3900885EEA /* NDHotKey.xcodeproj */;
 				},
 				{
 					ProjectRef = 17C808A70C3BD1BA005707C4 /* Shorten.xcodeproj */;
 				},
 				{
-					ProductGroup = 17BF2B200CDD77EB007E1295 /* Products */;
-					ProjectRef = 17BF2B1F0CDD77EB007E1295 /* Sparkle.xcodeproj */;
-				},
-				{
 					ProductGroup = 17C808B10C3BD1C5005707C4 /* Products */;
 					ProjectRef = 17C808B00C3BD1C5005707C4 /* TagLib.xcodeproj */;
 				},
 			remoteRef = 17B7CF7B0F5A09FD00A47027 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		17BF2B270CDD77EB007E1295 /* Sparkle.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = Sparkle.framework;
-			remoteRef = 17BF2B260CDD77EB007E1295 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
 		17C808790C3BD167005707C4 /* FileSource.bundle */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.cfbundle;
 			remoteRef = B09E94340D747F7B0064F138 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		CDD1B4B515E96F3900885EEA /* NDHotKey.framework */ = {
+		CDD1B74115EDDB5C00885EEA /* NDHotKey.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
 			path = NDHotKey.framework;
-			remoteRef = CDD1B4B415E96F3900885EEA /* PBXContainerItemProxy */;
+			remoteRef = CDD1B74015EDDB5C00885EEA /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
 /* End PBXReferenceProxy section */
 			name = "AudioOverload Plugin";
 			targetProxy = 17B7CF950F5A0A3700A47027 /* PBXContainerItemProxy */;
 		};
-		17BF2B3A0CDD7827007E1295 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = Sparkle;
-			targetProxy = 17BF2B390CDD7827007E1295 /* PBXContainerItemProxy */;
-		};
 		17C8097E0C3BD1F5005707C4 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			name = Musepack;
 			name = Pls;
 			targetProxy = 8E8D41CB0CBB0DD200135C1B /* PBXContainerItemProxy */;
 		};
-		CDD1B55315E972F100885EEA /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = NDHotKey;
-			targetProxy = CDD1B55215E972F100885EEA /* PBXContainerItemProxy */;
-		};
 /* End PBXTargetDependency section */
 
 /* Begin PBXVariantGroup section */
 		C01FCF4B08A954540054247B /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
+				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
 				COPY_PHASE_STRIP = NO;
 				FRAMEWORK_SEARCH_PATHS = (
 					ThirdParty/Frameworks/,
 		C01FCF4C08A954540054247B /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
+				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
 				FRAMEWORK_SEARCH_PATHS = (
 					ThirdParty/Frameworks/,
 					"\"$(SRCROOT)/build/Release\"",

Cog.xcodeproj/project.xcworkspace/xcuserdata/authoritylabs.xcuserdatad/UserInterfaceState.xcuserstate

Binary file modified.

Frameworks/NDHotKey/NDHotKey.xcodeproj/project.pbxproj

-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		32F1615A14E6BB3B00D6AB2F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32F1615914E6BB3B00D6AB2F /* Cocoa.framework */; };
-		32F1616414E6BB3B00D6AB2F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 32F1616214E6BB3B00D6AB2F /* InfoPlist.strings */; };
-		32F1617A14E6BBFC00D6AB2F /* NDHotKeyControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 32F1617414E6BBFC00D6AB2F /* NDHotKeyControl.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		32F1617B14E6BBFC00D6AB2F /* NDHotKeyControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F1617514E6BBFC00D6AB2F /* NDHotKeyControl.m */; };
-		32F1617C14E6BBFC00D6AB2F /* NDHotKeyEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 32F1617614E6BBFC00D6AB2F /* NDHotKeyEvent.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		32F1617D14E6BBFC00D6AB2F /* NDHotKeyEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F1617714E6BBFC00D6AB2F /* NDHotKeyEvent.m */; };
-		32F1617E14E6BBFC00D6AB2F /* NDKeyboardLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 32F1617814E6BBFC00D6AB2F /* NDKeyboardLayout.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		32F1617F14E6BBFC00D6AB2F /* NDKeyboardLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F1617914E6BBFC00D6AB2F /* NDKeyboardLayout.m */; };
-		32F1618E14E6BE7300D6AB2F /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32F1618D14E6BE7300D6AB2F /* Carbon.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		32F1615614E6BB3B00D6AB2F /* NDHotKey.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NDHotKey.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		32F1615914E6BB3B00D6AB2F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
-		32F1615C14E6BB3B00D6AB2F /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
-		32F1615D14E6BB3B00D6AB2F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
-		32F1615E14E6BB3B00D6AB2F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		32F1616114E6BB3B00D6AB2F /* NDHotKey-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "NDHotKey-Info.plist"; sourceTree = "<group>"; };
-		32F1616314E6BB3B00D6AB2F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		32F1616514E6BB3B00D6AB2F /* NDHotKey-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NDHotKey-Prefix.pch"; sourceTree = "<group>"; };
-		32F1617414E6BBFC00D6AB2F /* NDHotKeyControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NDHotKeyControl.h; sourceTree = "<group>"; };
-		32F1617514E6BBFC00D6AB2F /* NDHotKeyControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NDHotKeyControl.m; sourceTree = "<group>"; };
-		32F1617614E6BBFC00D6AB2F /* NDHotKeyEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NDHotKeyEvent.h; sourceTree = "<group>"; };
-		32F1617714E6BBFC00D6AB2F /* NDHotKeyEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NDHotKeyEvent.m; sourceTree = "<group>"; };
-		32F1617814E6BBFC00D6AB2F /* NDKeyboardLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NDKeyboardLayout.h; sourceTree = "<group>"; };
-		32F1617914E6BBFC00D6AB2F /* NDKeyboardLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NDKeyboardLayout.m; sourceTree = "<group>"; };
-		32F1618D14E6BE7300D6AB2F /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		32F1615214E6BB3B00D6AB2F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				32F1618E14E6BE7300D6AB2F /* Carbon.framework in Frameworks */,
-				32F1615A14E6BB3B00D6AB2F /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		32F1614A14E6BB3B00D6AB2F = {
-			isa = PBXGroup;
-			children = (
-				32F1618D14E6BE7300D6AB2F /* Carbon.framework */,
-				32F1615F14E6BB3B00D6AB2F /* NDHotKey */,
-				32F1615814E6BB3B00D6AB2F /* Frameworks */,
-				32F1615714E6BB3B00D6AB2F /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		32F1615714E6BB3B00D6AB2F /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				32F1615614E6BB3B00D6AB2F /* NDHotKey.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		32F1615814E6BB3B00D6AB2F /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				32F1615914E6BB3B00D6AB2F /* Cocoa.framework */,
-				32F1615B14E6BB3B00D6AB2F /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		32F1615B14E6BB3B00D6AB2F /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				32F1615C14E6BB3B00D6AB2F /* AppKit.framework */,
-				32F1615D14E6BB3B00D6AB2F /* CoreData.framework */,
-				32F1615E14E6BB3B00D6AB2F /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "<group>";
-		};
-		32F1615F14E6BB3B00D6AB2F /* NDHotKey */ = {
-			isa = PBXGroup;
-			children = (
-				32F1617414E6BBFC00D6AB2F /* NDHotKeyControl.h */,
-				32F1617514E6BBFC00D6AB2F /* NDHotKeyControl.m */,
-				32F1617614E6BBFC00D6AB2F /* NDHotKeyEvent.h */,
-				32F1617714E6BBFC00D6AB2F /* NDHotKeyEvent.m */,
-				32F1617814E6BBFC00D6AB2F /* NDKeyboardLayout.h */,
-				32F1617914E6BBFC00D6AB2F /* NDKeyboardLayout.m */,
-				32F1616014E6BB3B00D6AB2F /* Supporting Files */,
-			);
-			path = NDHotKey;
-			sourceTree = "<group>";
-		};
-		32F1616014E6BB3B00D6AB2F /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				32F1616114E6BB3B00D6AB2F /* NDHotKey-Info.plist */,
-				32F1616214E6BB3B00D6AB2F /* InfoPlist.strings */,
-				32F1616514E6BB3B00D6AB2F /* NDHotKey-Prefix.pch */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		32F1615314E6BB3B00D6AB2F /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				32F1617A14E6BBFC00D6AB2F /* NDHotKeyControl.h in Headers */,
-				32F1617C14E6BBFC00D6AB2F /* NDHotKeyEvent.h in Headers */,
-				32F1617E14E6BBFC00D6AB2F /* NDKeyboardLayout.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		32F1615514E6BB3B00D6AB2F /* NDHotKey */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 32F1616B14E6BB3B00D6AB2F /* Build configuration list for PBXNativeTarget "NDHotKey" */;
-			buildPhases = (
-				32F1615114E6BB3B00D6AB2F /* Sources */,
-				32F1615214E6BB3B00D6AB2F /* Frameworks */,
-				32F1615314E6BB3B00D6AB2F /* Headers */,
-				32F1615414E6BB3B00D6AB2F /* Resources */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = NDHotKey;
-			productName = NDHotKey;
-			productReference = 32F1615614E6BB3B00D6AB2F /* NDHotKey.framework */;
-			productType = "com.apple.product-type.framework";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		32F1614C14E6BB3B00D6AB2F /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0440;
-				ORGANIZATIONNAME = "dmitry.promsky@gmail.com";
-			};
-			buildConfigurationList = 32F1614F14E6BB3B00D6AB2F /* Build configuration list for PBXProject "NDHotKey" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-			);
-			mainGroup = 32F1614A14E6BB3B00D6AB2F;
-			productRefGroup = 32F1615714E6BB3B00D6AB2F /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				32F1615514E6BB3B00D6AB2F /* NDHotKey */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		32F1615414E6BB3B00D6AB2F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				32F1616414E6BB3B00D6AB2F /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		32F1615114E6BB3B00D6AB2F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				32F1617B14E6BBFC00D6AB2F /* NDHotKeyControl.m in Sources */,
-				32F1617D14E6BBFC00D6AB2F /* NDHotKeyEvent.m in Sources */,
-				32F1617F14E6BBFC00D6AB2F /* NDKeyboardLayout.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		32F1616214E6BB3B00D6AB2F /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				32F1616314E6BB3B00D6AB2F /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		32F1616914E6BB3B00D6AB2F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				INSTALL_PATH = "@rpath";
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				ONLY_ACTIVE_ARCH = YES;
-				SDKROOT = macosx;
-				SYMROOT = ../../build;
-			};
-			name = Debug;
-		};
-		32F1616A14E6BB3B00D6AB2F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				INSTALL_PATH = "@rpath";
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				SDKROOT = macosx;
-				SYMROOT = ../../build;
-			};
-			name = Release;
-		};
-		32F1616C14E6BB3B00D6AB2F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_VERSION = A;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "NDHotKey/NDHotKey-Prefix.pch";
-				INFOPLIST_FILE = "NDHotKey/NDHotKey-Info.plist";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				WRAPPER_EXTENSION = framework;
-			};
-			name = Debug;
-		};
-		32F1616D14E6BB3B00D6AB2F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_VERSION = A;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "NDHotKey/NDHotKey-Prefix.pch";
-				INFOPLIST_FILE = "NDHotKey/NDHotKey-Info.plist";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				WRAPPER_EXTENSION = framework;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		32F1614F14E6BB3B00D6AB2F /* Build configuration list for PBXProject "NDHotKey" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				32F1616914E6BB3B00D6AB2F /* Debug */,
-				32F1616A14E6BB3B00D6AB2F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		32F1616B14E6BB3B00D6AB2F /* Build configuration list for PBXNativeTarget "NDHotKey" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				32F1616C14E6BB3B00D6AB2F /* Debug */,
-				32F1616D14E6BB3B00D6AB2F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 32F1614C14E6BB3B00D6AB2F /* Project object */;
-}

Frameworks/NDHotKey/NDHotKey.xcodeproj/xcuserdata/authoritylabs.xcuserdatad/xcschemes/NDHotKey.xcscheme

-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0440"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "32F1615514E6BB3B00D6AB2F"
-               BuildableName = "NDHotKey.framework"
-               BlueprintName = "NDHotKey"
-               ReferencedContainer = "container:NDHotKey.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      buildConfiguration = "Debug">
-      <Testables>
-      </Testables>
-   </TestAction>
-   <LaunchAction
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      buildConfiguration = "Debug"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      allowLocationSimulation = "YES">
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      buildConfiguration = "Release"
-      debugDocumentVersioning = "YES">
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>

Frameworks/NDHotKey/NDHotKey.xcodeproj/xcuserdata/authoritylabs.xcuserdatad/xcschemes/xcschememanagement.plist

-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>SchemeUserState</key>
-	<dict>
-		<key>NDHotKey.xcscheme</key>
-		<dict>
-			<key>orderHint</key>
-			<integer>6</integer>
-		</dict>
-	</dict>
-	<key>SuppressBuildableAutocreation</key>
-	<dict>
-		<key>32F1615514E6BB3B00D6AB2F</key>
-		<dict>
-			<key>primary</key>
-			<true/>
-		</dict>
-	</dict>
-</dict>
-</plist>

Frameworks/NDHotKey/NDHotKey/NDHotKey-Info.plist

-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>ND.${PRODUCT_NAME:rfc1034identifier}</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>FMWK</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2012 dmitry.promsky@gmail.com. All rights reserved.</string>
-	<key>NSPrincipalClass</key>
-	<string></string>
-</dict>
-</plist>

Frameworks/NDHotKey/NDHotKey/NDHotKey-Prefix.pch

-//
-// Prefix header for all source files of the 'NDHotKey' target in the 'NDHotKey' project
-//
-
-#ifdef __OBJC__
-    #import <Cocoa/Cocoa.h>
-#endif

Frameworks/NDHotKey/NDHotKey/NDHotKeyControl.h

-/*
-	NDHotKeyControl.h
-
-	Created by Nathan Day on 29.03.08 under a MIT-style license.
-	Copyright (c) 2008 Nathan Day
-
-	Permission is hereby granted, free of charge, to any person obtaining a copy
-	of this software and associated documentation files (the "Software"), to deal
-	in the Software without restriction, including without limitation the rights
-	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-	copies of the Software, and to permit persons to whom the Software is
-	furnished to do so, subject to the following conditions:
-
-	The above copyright notice and this permission notice shall be included in
-	all copies or substantial portions of the Software.
-
-	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-	THE SOFTWARE.
- */
-
-/*!
-	@header NDHotKeyControl.h
-	@abstract Header file for a subclass of NSTextField for getting hot key combinations from the user.
-	@discussion The <tt>NDHotKeyControl</tt> can be used to get a  <tt>NDHotKeyEvent</tt> for the last key combination pressed by the user.
-	@updated 2010-01-18
- */
-
-#import <AppKit/AppKit.h>
-
-@class	NDHotKeyEvent;
-
-/*!
-	@class NDHotKeyControl
-	@abstract Subclass of NSTextField for getting hot key combinations from the user.
-	@discussion The <tt>NDHotKeyControl</tt> can be used to get a  <tt>NDHotKeyEvent</tt> for the last key combination pressed by the user.
- */
-@interface NDHotKeyControl : NSTextField
-{
-@private
-	UInt16				keyCode;
-	NSUInteger			modifierFlags;
-	BOOL				requiresModifierKeys,
-						readyForEvent,
-						stayReadyForEvent;
-	id					lastReadyForEventSender;
-}
-
-- (IBAction)readyForHotKeyEventChanged:(id)sender;
-/*!
-	@method keyCode
-	@abstract Get key code.
-	@discussion Returns the key code for the last key combination the user pressed while the reciever was active.
-	@result A <tt>UInt16</tt> containing key code.
- */
-- (UInt16)keyCode;
-
-/*!
-	@method character
-	@abstract Get unicode character.
-	@discussion Returns the unicode character for the last key combination the user pressed while the reciever was active.
-	@result A <tt>unichar</tt> containing character.
- */
-- (unichar)character;
-
-/*!
-	@method modifierFlags
-	@abstract Get modifer flags.
-	@discussion Returns the modifer flags for the last key combination the user pressed while the reciever was active.
-	@result A <tt>unsigned long</tt> containing modifer flags.
- */
-- (NSUInteger)modifierFlags;
-
-/*!
-	@method hotKeyEvent
-	@abstract Get <tt>NDHotKeyEvent</tt>
-	@discussion Returns the <tt>NDHotKeyEvent</tt> instance for the last key combination the user pressed while the reciever was active. The <tt>NDHotKeyEvent</tt> returned will either be one that has already been created or a newly created one otherwise.
-	@result A <tt>NDHotKeyEvent</tt> for the hot key event.
- */
-- (NDHotKeyEvent *)hotKeyEvent;
-
-/*!
-	@method setRequiresModifierKeys:
-	@abstract Set whether hot keys entered need modifiers keys.
-	@discussion This does not include function key which do not require modifier keys no matter what the value you pass for the argument <tt><i>flag</i></tt>
-	@param flag If <tt>NO</tt> then the reciever only accepts hot keys combination containing modifer keys.
- */
-- (void)setRequiresModifierKeys:(BOOL)flag;
-/*!
-	@method requiresModifierKeys
-	@abstract Returns whether hot keys entered need modifiers keys.
-	@discussion This does not include key which do not require modifier keys no matter what the value is returned.
-	@result If <tt>NO</tt> then the reciever only accepts hot keys combination containing modifer keys.
- */
-- (BOOL)requiresModifierKeys;
-
-/*!
-	@method setReadyForHotKeyEvent:
-	@abstract Set up the control to accept input
-	@discussion Setting <tt>readyForHotKeyEvent</tt> to <tt>YES</tt> will disable all Hot Key Events and then prepare <tt>NDHotKeyControl</tt> for keyboard input. Setting <tt>readyForHotKeyEvent</tt> to <tt>NO</tt> will re-enables all Hot Key Events and then stops <tt>NDHotKeyControl</tt> for accepting keyboard input.
-	@param flag <#description#>
- */
-- (void)setReadyForHotKeyEvent:(BOOL)flag;
-/*!
-	@method readyForHotKeyEvent
-	@abstract Is the control set up to accept input
-	@discussion Returns the current state of <tt>readyForHotKeyEvent</tt> as set by the method <tt>setReadyForHotKeyEvent:</tt>.
- */
-- (BOOL)readyForHotKeyEvent;
-/*!
-	@method setStayReadyForEvent:
-	@abstract Will the control remain continually active.
-	@discussion By default <tt>NDHotKeyControl</tt> will accept one key and then call <tt>[self setReadyForHotKeyEvent:NO]</tt>, <tt>setStayReadyForEvent:</tt> allows you to change this behaviour so that <tt>NDHotKeyControl</tt> will continue accepting keys until it is manually deactivated.
- */
-- (void)setStayReadyForEvent:(BOOL)flag;
-/*!
-	@method stayReadyForEvent
-	@abstract Will the control remain continually active.
-	@discussion By default <tt>NDHotKeyControl</tt> will accept one key and then call <tt>[self setReadyForHotKeyEvent:NO]</tt>, if <tt>stayReadyForEvent</tt> returns <tt>YES</tt>, <tt>NDHotKeyControl</tt> will continue accepting keys until it is manually deactivated.
- */
-- (BOOL)stayReadyForEvent;
-
-
-@end

Frameworks/NDHotKey/NDHotKey/NDHotKeyControl.m

-/*
-	NDHotKeyControl.m
-
-	Created by Nathan Day on 21.06.06 under a MIT-style license.
-	Copyright (c) 2008 Nathan Day
-
-	Permission is hereby granted, free of charge, to any person obtaining a copy
-	of this software and associated documentation files (the "Software"), to deal
-	in the Software without restriction, including without limitation the rights
-	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-	copies of the Software, and to permit persons to whom the Software is
-	furnished to do so, subject to the following conditions:
-
-	The above copyright notice and this permission notice shall be included in
-	all copies or substantial portions of the Software.
-
-	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-	THE SOFTWARE.
- */
-
-#import "NDHotKeyControl.h"
-#import "NDHotKeyEvent.h"
-#import "NDKeyboardLayout.h"
-
-/*
- * class implementation NDHotKeyControl
- */
-@implementation NDHotKeyControl
-
-/*
- * -initWithFrame:
- */
-- (id)initWithFrame:(NSRect)aFrame
-{
-    if ( (self = [super initWithFrame:aFrame]) != nil )
-	 {
-		 [self setEditable:NO];
-		 requiresModifierKeys = YES;
-		 readyForEvent = NO;
-		 stayReadyForEvent = NO;
-   }
-    return self;
-}
-
-/*
- * -initWithCoder:
- */
-- (id)initWithCoder:(NSCoder *)aCoder
-{
-	if( (self = [super initWithCoder:aCoder]) != nil )
-	{
-		[self setEditable:NO];
-		requiresModifierKeys = YES;
-		readyForEvent = NO;
-		stayReadyForEvent = NO;
-	}
-	return self;
-}
-
-- (IBAction)readyForHotKeyEventChanged:(id)aSender
-{
-	if( [aSender isKindOfClass:[NSMatrix class]] )
-		aSender = [aSender selectedCell];
-
-	if( [aSender isKindOfClass:[NSButton class]] || [aSender isKindOfClass:[NSButtonCell class]] )
-	{
-		if( [aSender state] == NSOnState )
-		{
-			[self setReadyForHotKeyEvent:YES];
-			lastReadyForEventSender = aSender;
-			[self setStringValue:@""];
-		}
-		else
-		{
-			[self setReadyForHotKeyEvent:NO];
-			lastReadyForEventSender = nil;
-		}
-	}
-}
-
-/*
- * -keyCode
- */
-- (unsigned short)keyCode
-{
-	return keyCode;
-}
-
-/*
- * -character
- */
-- (unichar)character
-{
-	return [[NDKeyboardLayout keyboardLayout] characterForKeyCode:[self keyCode]];
-}
-
-/*
- * -modifierFlags
- */
-- (NSUInteger)modifierFlags
-{
-	return modifierFlags;
-}
-
-/*
- * -performKeyEquivalent:
- */
-- (BOOL)performKeyEquivalent:(NSEvent*)anEvent
-{
-	BOOL		theResult = NO;
-	if( [self readyForHotKeyEvent] )
-	{
-		[self keyDown:anEvent];
-		theResult = YES;
-	}
-	else
-		theResult = [super performKeyEquivalent:anEvent];
-	return theResult;
-}
-
-/*
- * -keyDown:
- */
-- (void)keyDown:(NSEvent *)anEvent
-{
-	NSUInteger		theModifierFlags = [anEvent modifierFlags];
-	unichar			theChar = [[anEvent charactersIgnoringModifiers] characterAtIndex:0];
-	theModifierFlags &= (NSShiftKeyMask|NSControlKeyMask|NSAlternateKeyMask|NSCommandKeyMask);
-
-	if( (theModifierFlags != 0 || !requiresModifierKeys || theChar > 255) && theChar != 0 )
-	{
-		keyCode = [anEvent keyCode];
-		modifierFlags = theModifierFlags;
-
-		[self setStringValue:[[NDKeyboardLayout keyboardLayout] stringForKeyCode:keyCode modifierFlags:modifierFlags]];
-		[self performClick:self];
-		if( ![self stayReadyForEvent] )
-			[self setReadyForHotKeyEvent:NO];
-	}
-}
-
-/*
- * -hotKeyEvent
- */
-- (NDHotKeyEvent *)hotKeyEvent
-{
-	return [NDHotKeyEvent getHotKeyForKeyCode:[self keyCode] modifierFlags:[self modifierFlags]];
-}
-
-- (void)setRequiresModifierKeys:(BOOL)aFlag
-{
-	requiresModifierKeys = aFlag;
-}
-
-- (BOOL)requiresModifierKeys
-{
-	return requiresModifierKeys;
-}
-
-- (void)setReadyForHotKeyEvent:(BOOL)aFlag
-{
-	readyForEvent = aFlag;
-
-	[NDHotKeyEvent setAllEnabled:!readyForEvent];
-	if( readyForEvent == NO && lastReadyForEventSender )
-	{
-		[lastReadyForEventSender setState:NSOffState];
-		lastReadyForEventSender = nil;
-	}
-}
-
-- (BOOL)readyForHotKeyEvent
-{
-	return readyForEvent;
-}
-
-- (void)setStayReadyForEvent:(BOOL)aFlag
-{
-	stayReadyForEvent = aFlag;
-}
-
-- (BOOL)stayReadyForEvent
-{
-	return stayReadyForEvent;
-}
-
-
-@end
-

Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.h

-/*
-	NDHotKeyEvent.h
-
-	Created by Nathan Day on 12.06.04 under a MIT-style license.
-	Copyright (c) 2008 Nathan Day
-
-	Permission is hereby granted, free of charge, to any person obtaining a copy
-	of this software and associated documentation files (the "Software"), to deal
-	in the Software without restriction, including without limitation the rights
-	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-	copies of the Software, and to permit persons to whom the Software is
-	furnished to do so, subject to the following conditions:
-
-	The above copyright notice and this permission notice shall be included in
-	all copies or substantial portions of the Software.
-
-	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-	THE SOFTWARE.
- */
-
-/*!
-	@header NDHotKeyEvent.h
-	@abstract Header file for the class <tt>NDHotKeyEvent</tt>
-	@discussion <p><tt>NDHotKeyEvent</tt> provides a thread safe Objective-C interface to HotKey events as well as some additional feature to key track of all the hot keys in your application.</p>
-
-	<p><h4>Thread Saftey</h4>By default the class object <tt>NDHotKeyEvent</tt> is not thread safe as the underlying functions that it relies on are not thread safe and the mechanism for keeping track of all of the <tt>NDHotKeyEvent</tt> instances is not thread safe either. Thread saftey can be enable be defining the flag <tt>NDHotKeyEventThreadSafe</tt> before compiling.</p>
-	<p>Even with the flag <tt>NDHotKeyEventThreadSafe</tt> defined instances of <tt>NDHotKeyEvent</tt> will still not be thread safe, that is, it is safe to invoke methods of different instance with different threads as well as class methods, but it is not safe to invoke methods of the same instance with different threads.</p>
-	<p>The functions <tt>stringForKeyCodeAndModifierFlags</tt> and <tt>unicharForKeyCode</tt> are never thread safe.</p>
-	@updated 2010-01-18
-	@version 1.1.0
- */
-
-#import <Cocoa/Cocoa.h>
-#import <Carbon/Carbon.h>
-
-/*!
-	@defined NDHotKeyEventThreadSafe
-	@abstract A flag to enable thread safety.
-	@discussion By default the class object <tt>NDHotKeyEvent</tt> is not thread safe. Defining the this flag will make th class methods of <tt>NDHotKeyEvent</tt> thread safe, see introduction for more details..
- */
-enum
-{
-/*!
-	@const NDHotKeyNoEvent
-	@abstract A value returned from the method <tt>-[NDHotKeyEvent currentEventType]</tt>
-	@discussion This value is returned if the hot key has not been pressed yet.
- */
- 	NDHotKeyNoEvent = 0,
-/*!
-	@const NDHotKeyPressedEvent
-	@abstract A value returned from the method <tt>-[NDHotKeyEvent currentEventType]</tt>
-	@discussion This value is returned if hot key was pressed last.
- */
- 	NDHotKeyPressedEvent,
-/*!
-	@const NDHotKeyReleasedEvent
-	@abstract A value returned from the method <tt>-[NDHotKeyEvent currentEventType]</tt>
-	@discussion This value is returned if hot key was released last.
- */
-	NDHotKeyReleasedEvent
-};
-
-/*!
-	@const NDHotKeyDefaultSignature
-	@abstract The default signature
-	@discussion This is the default signature that will be used if you start using <tt>NDHotKeyEvent</tt> without setting the signature first.
- */
-extern const OSType			NDHotKeyDefaultSignature;
-
-/*!
-	@class NDHotKeyEvent
-	@abstract Class to represent a HotKey
-	@discussion <p>This class is a wrapper for Carbon Event HotKeys and provides some feature to key track of all the hot keys in your application. It can be used to be notified of key down as well as key up evernts and when a hot key is being taken by another object (see the protocol <tt>NDHotKeyEventTragetWillChange</tt>)</p>
- 
- */
-@interface NDHotKeyEvent : NSObject <NSCoding>
-{
-@private
-	EventHotKeyRef		reference;
-	UInt16				keyCode;
-	NSUInteger			modifierFlags;
-	int					currentEventType;
-	id					target;
-	SEL					selectorReleased,
-						selectorPressed;
-
-	struct
-	{
-		unsigned			individual		: 1;
-		unsigned			collective		: 1;
-	}						isEnabled;
-}
-
-/*!
-	@method install
-	@abstract Install the event key handler
-	@discussion <tt>install</tt> is called before hot keys can be used. You normally don't need to invoke this method your self but in a multithreaded you might want to invoke this method before creating any threads. <tt>install</tt> is designed to be thread safe but the effects of calling Apples <tt>InstallEventHandler()</tt> funtion from anything other than the main thread is unknown.
-	@result Returns true if <tt>install</tt> succeeded.
- */
-+ (BOOL)install;
-
-/*!
-	@method uninstall
-	@abstract Unistall the evenr key handler.
-	@discussion This method can be called if you want to remove all hot key permanently, without you application having to quit, you do not need to call this method if you application is about to quite. 
- */
-+ (void)uninstall;
-
-	/*!
-	@method setSignature:
-	@abstract Set the hot key signature for this application
-	@discussion This should only be called once, before trying to enable any hot keys.
-	@param signature The four char code signature to identify all hot keys for this application, could your applications signature.
- */
-+ (void)setSignature:(OSType)signature;
-
-/*!
-	@method signature
-	@abstract Get the hot key signature for this application
-	@discussion Used to identify the hot key handler for this application.
-	@result The four char code signature.
- */
-+ (OSType)signature;
-
-/*!
-	@method setAllEnabled:
-	@abstract Set enabled for all instances of <tt>NDHotKeyEvent</tt>
-	@discussion Used to enable or disable all hot keys. This method is not the same as sending the message <tt>setEnabled:</tt> to every single <tt>NDHotKeyEvent</tt> instance. Enabling with this method only enables the hot keys that where enable prior to using this method to disable all hot keys.
-	@param flag <tt>YES</tt> to enable, <tt>NO</tt> to disable.
-	@result Returns <tt>YES</tt> if succesful.
- */
-+ (BOOL)setAllEnabled:(BOOL)flag;
-
-/*!
-	@method isEnabledKeyCharacter:modifierFlags:
-	@abstract Is hot key combination enabled.
-	@abstract Test to see if a key code and modifier flaf combination are enabled.
-	@param keyCharacter The key character used by the keyboard.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt>, <tt>NSNumericPadKeyMask</tt> ).
-	@result Returns <tt>YES</tt> if enabled.
- */
-+ (BOOL)isEnabledKeyCharacter:(unichar)keyCharacter modifierFlags:(NSUInteger)modifierFlags;
-/*!
-	@method isEnabledKeyCode:modifierFlags:
-	@abstract Is hot key combination enabled.
-	@abstract Test to see if a key code and modifier flaf combination are enabled.
-	@param keyCode The key code used by the keyboard, can vary across hardware.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt> ).
-	@result Returns <tt>YES</tt> if enabled.
- */
-+ (BOOL)isEnabledKeyCode:(UInt16)keyCode modifierFlags:(NSUInteger)modifierFlags;
-
-/*!
-	@method getHotKeyForKeyCharacter:modifierFlags:
-	@abstract Get an <tt>NDHotKeyEvent</tt>
-	@discussion Gets a <tt>NDHotKeyEvent</tt> for the supplied key code and modifer flags by either finding one that has already been created or by creating a new one..
-	@param keyCharacter The key character used by the keyboard.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt>, <tt>NSNumericPadKeyMask</tt> ).
-	@result The <tt>NDHotKeyEvent</tt> obejct or nil if failure.
- */
-+ (NDHotKeyEvent *)getHotKeyForKeyCharacter:(unichar)keyCharacter modifierFlags:(NSUInteger)modifierFlags;
-/*!
-	@method getHotKeyForKeyCode:modifierFlags:
-	@abstract Get an <tt>NDHotKeyEvent</tt>
-	@discussion Gets a <tt>NDHotKeyEvent</tt> for the supplied key code and modifer flags by either finding one that has already been created or by creating a new one..
-	@param keyCode The key code used by the keyboard, can vary across hardware.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt> ).
-	@result The <tt>NDHotKeyEvent</tt> obejct or nil if failure.
- */
-+ (NDHotKeyEvent *)getHotKeyForKeyCode:(UInt16)keyCode modifierFlags:(NSUInteger)modifierFlags;
-/*!
-	@method findHotKeyForKeyCharacter:modifierFlags:
-	@abstract Find an <tt>NDHotKeyEvent</tt>
-	@discussion Finds the <tt>NDHotKeyEvent</tt> for the supplied key code and modifer flags.
-	@param keyCharacter The key character used by the keyboard.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt>, <tt>NSNumericPadKeyMask</tt> ).
-	@result The <tt>NDHotKeyEvent</tt> obejct or nil if none found.
- */
-+ (NDHotKeyEvent *)findHotKeyForKeyCharacter:(unichar)keyCharacter modifierFlags:(NSUInteger)modifierFlags;
-/*!
-	@method findHotKeyForKeyCode:modifierFlags:
-	@abstract Find an <tt>NDHotKeyEvent</tt>
-	@discussion Finds the <tt>NDHotKeyEvent</tt> for the supplied key code and modifer flags.
-	@param keyCode The key code used by the keyboard, can vary across hardware.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt> ).
-	@result The <tt>NDHotKeyEvent</tt> obejct or nil if none found.
- */
-+ (NDHotKeyEvent *)findHotKeyForKeyCode:(UInt16)keyCode modifierFlags:(NSUInteger)modifierFlags;
-
-/*!
-	@method findHotKeyForId:
-	@abstract Find an <tt>NDHotKeyEvent</tt>
-	@discussion Finds the <tt>NDHotKeyEvent</tt> for the with the given ID, you can find an already created <tt>NDHotKeyEvent</tt> but there is currently now way to create a new <tt>NDHotKeyEvent</tt> from a HotKey you create with Apple API's.
-	@param ID The hot key id as returned by <tt>hotKeyId</tt>
-	@result The <tt>NDHotKeyEvent</tt> obejct or nil if none found.
- */
-+ (NDHotKeyEvent *)findHotKeyForId:(UInt32)ID;
-
-/*!
-	@method hotKeyWithEvent:
-	@abstract Get a <tt>NDHotKeyEvent</tt> object.
-	@discussion Returns a new hot key for the supplied event, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param event The event generated from the user presssing the desired hot key combination.
-	@result An new <tt>NDHotKeyEvent</tt> or nil if failure.
- */
-+ (id)hotKeyWithEvent:(NSEvent *)event;
-/*!
-	@method hotKeyWithEvent:target:selector:
-	@abstract Get a <tt>NDHotKeyEvent</tt> object.
-	@discussion Returns a new hot key for the supplied event, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param event The event generated from the user presssing the desired hot key combination.
-	@param target The target of hot key event.
-	@param selector The selector sent when hot key is released
-	@result An new <tt>NDHotKeyEvent</tt> or nil if failure.
- */
-+ (id)hotKeyWithEvent:(NSEvent *)event target:(id)target selector:(SEL)selector;
-/*!
-	@method hotKeyWithKeyCharacter:modifierFlags:
-	@abstract Get a <tt>NDHotKeyEvent</tt> object.
-	@discussion Returns a new hot key for the supplied hot key combination, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param keyCharacter The key character used by the keyboard.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt>, <tt>NSNumericPadKeyMask</tt> ).
-	@result An new <tt>NDHotKeyEvent</tt> or nil if failure.
- */
-+ (id)hotKeyWithKeyCharacter:(unichar)keyCharacter modifierFlags:(NSUInteger)modifer;
-/*!
-	@method hotKeyWithKeyCode:modifierFlags:
-	@abstract Get a <tt>NDHotKeyEvent</tt> object.
-	@discussion Returns a new hot key for the supplied hot key combination, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param keyCode The key code used by the keyboard, can vary across hardware.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt> ).
-	@result An new <tt>NDHotKeyEvent</tt> or nil if failure.
- */
-+ (id)hotKeyWithKeyCode:(UInt16)keyCode modifierFlags:(NSUInteger)modifer;
-
-/*!
-	@method hotKeyWithKeyCharacter:modifierFlags:target:selector:
-	@abstract Get a <tt>NDHotKeyEvent</tt> object.
-	@discussion Returns a new hot key for the supplied hot key combination and target object and selector, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param keyCharacter The key character used by the keyboard.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt>, <tt>NSNumericPadKeyMask</tt> ).
-	@param target The target of hot key event.
-	@param selector The selector sent when hot key is released
-	@result A new <tt>NDHotKeyEvent</tt>
- */
-+ (id)hotKeyWithKeyCharacter:(unichar)keyCharacter modifierFlags:(NSUInteger)modifer target:(id)target selector:(SEL)selector;
-/*!
-	@method hotKeyWithKeyCode:modifierFlags:target:selector:
-	@abstract Get a <tt>NDHotKeyEvent</tt> object.
-	@discussion Returns a new hot key for the supplied hot key combination and target object and selector, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param keyCode The key code used by the keyboard, can vary across hardware.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt> ).
-	@param target The target of hot key event.
-	@param selector The selector sent when hot key is released
-	@result A new <tt>NDHotKeyEvent</tt>
- */
-+ (id)hotKeyWithKeyCode:(UInt16)keyCode modifierFlags:(NSUInteger)modifer target:(id)target selector:(SEL)selector;
-
-/*!
-	@method initWithPropertyList:
-	@abstract creates a <tt>NDHotKeyEvent</tt> with a property list.
-	@discussion This can be used for archiving purposes, but it is possible that it will not work if the users keyboard is changed, ie between machines.
-	@param propertyList A property list object
-	@result A initialized <tt>NDHotKeyEvent</tt>
- */
-+ (id)hotKeyWithWithPropertyList:(id)propertyList;
-/*!
-	@method initWithEvent:
-	@abstract Initialize a <tt>NDHotKeyEvent</tt> object.
-	@discussion Initialize the reciever with the supplied hot key combination contained with the event <tt>event</tt> and target object and selector, if there is already a hot key for the supplied event then nil is returned.
-	@param event The key code used by the keyboard, can vary across hardware.
-	@result A initialized <tt>NDHotKeyEvent</tt>
- */
-- (id)initWithEvent:(NSEvent *)event;
-/*!
-	@method initWithEvent:target:selector:
-	@abstract Initialize a <tt>NDHotKeyEvent</tt> object.
-	@discussion Initialize the reciever with the supplied hot key combination contained with the event <tt>event</tt> and target object and selector, if there is already a hot key for the supplied event then nil is returned.
-	@param event An event used to create a hot key from.
-	@param target The target of hot key event.
-	@param selector The selector sent when hot key is released
-	@result A initialized <tt>NDHotKeyEvent</tt>
- */
-- (id)initWithEvent:(NSEvent *)event target:(id)target selector:(SEL)selector;
-
-/*!
-	@method initWithKeyCode:character:modifierFlags:target:selector:
-	@abstract Initialize a <tt>NDHotKeyEvent</tt> object.
-	@discussion Initialize the reciever with the supplied hot key combination and target object and selector, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param keyCharacter The key character used by the keyboard.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt>, <tt>NSNumericPadKeyMask</tt>, <tt>NSNumericPadKeyMask</tt> ).
-	@param target The target of hot key event.
-	@param selector The selector sent when hot key is released
-	@result A initialized <tt>NDHotKeyEvent</tt>
- */
-- (id)initWithKeyCharacter:(unichar)keyCharacter modifierFlags:(NSUInteger)modifer target:(id)target selector:(SEL)selector;
-/*!
-	@method initWithKeyCode:character:modifierFlags:target:selector:
-	@abstract Initialize a <tt>NDHotKeyEvent</tt> object.
-	@discussion Initialize the reciever with the supplied hot key combination and target object and selector, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param keyCode The key code used by the keyboard, can vary across hardware.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt> ).
-	@param target The target of hot key event.
-	@param selector The selector sent when hot key is released
-	@result A initialized <tt>NDHotKeyEvent</tt>
- */
-- (id)initWithKeyCode:(UInt16)keyCode modifierFlags:(NSUInteger)modifer target:(id)target selector:(SEL)selector;
-
-/*!
-	@method initWithKeyCode:character:modifierFlags
-	@abstract Initialize a <tt>NDHotKeyEvent</tt> object.
-	@discussion Initialize the reciever with the supplied hot key combination, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param keyCharacter The key character used by the keyboard.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt>, <tt>NSNumericPadKeyMask</tt> ).
-	@result A initialized <tt>NDHotKeyEvent</tt>
- */
-- (id)initWithKeyCharacter:(unichar)keyCharacter modifierFlags:(NSUInteger)modifer;
-/*!
-	@method initWithKeyCode:character:modifierFlags
-	@abstract Initialize a <tt>NDHotKeyEvent</tt> object.
-	@discussion Initialize the reciever with the supplied hot key combination, if there is already a hot key for the supplied key code and modifer flags then nil is returned.
-	@param keyCode The key code used by the keyboard, can vary across hardware.
-	@param modifierFlags The modifer flags, ( <tt>NSCommandKeyMask</tt>, <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt> ).
-	@result A initialized <tt>NDHotKeyEvent</tt>
- */
-- (id)initWithKeyCode:(UInt16)keyCode modifierFlags:(NSUInteger)modifer;
-
-/*!
-	@method initWithPropertyList:
-	@abstract Initializes the reciever with a property list.
-	@discussion This can be used for archiving purposes, but it is possible that it will not work if the users keyboard is changed, ie between machines. The following properties are initialised
-	<ul>
-		<li>Key Code</li>
-		<li>Character</li>
-		<li>Modifier Flags</li>
-		<li>Selector Pressed</li>
-		<li>Selector Released</li>
-	</ul>
-	@param propertyList A property list object
-	@result A initialized <tt>NDHotKeyEvent</tt>
-  */
-- (id)initWithPropertyList:(id)propertyList;
-/*!
-	@method propertyList
-	@abstract Returns a property list for the reciever.
-	@discussion This can be used for archiving purposes, but it is possible that it will not work if the users keyboard is changed, ie between machines. The property list returned contains the following properties;
-	<ul>
-		<li>Key Code</li>
-		<li>Character</li>
-		<li>Modifier Flags</li>
-		<li>Selector Pressed</li>
-		<li>Selector Released</li>
-	</ul>
-	@result The property list object.
-  */
-- (id)propertyList;
-
-/*!
-	@method initWithCoder:
-	@abstract Initializes a newly allocated instance from data in <tt>decoder</tt>.
-	@discussion Decodes the following properties of a <tt>NDHotKeyEvent</tt>;
-	<ul>
-		<li>Key Code</li>
-		<li>Character</li>
-		<li>Modifier Flags</li>
-		<li>Selector Pressed</li>
-		<li>Selector Released</li>
-	</ul>
-	Will use Keyed Coding if <code>[<i>decoder</i> allowsKeyedCoding] == YES</code>.
-	@param decoder A subclass of <tt>NSCoder</tt>
-	@result A initialized <tt>NDHotKeyEvent</tt>
- */
-- (id)initWithCoder:(NSCoder *)decoder;
-
-/*!
-	@method encodeWithCoder:
-	@abstract Encodes the receiver using <tt>encoder</tt>
-	@discussion Encodes the following properties of a <tt>NDHotKeyEvent</tt>;
-	<ul>
-		<li>Key Code</li>
-		<li>Character</li>
-		<li>Modifier Flags</li>
-		<li>Selector Pressed</li>
-		<li>Selector Released</li>
-	</ul>
-	Will use Keyed Coding if <code>[<i>encoder</i> allowsKeyedCoding] == YES</code>.
-	@param encoder A subclass of <tt>NSCoder</tt>.
- */
-- (void)encodeWithCoder:(NSCoder *)encoder;
-
-- (BOOL)setEnabled:(BOOL)flag;
-/*!
-	@method setEnabled:
-	@abstract Set the hot key enabled or disable.
-	@discussion <tt>setEnabled:</tt> registers or unregisters the recievers hot key combination.
-	@param flag <tt>YES</tt> to enable, <tt>NO</tt> to disable.
- */
-- (void)setIsEnabled:(BOOL)flag;
-
-/*!
-	@method isEnabled
-	@abstract Find out if a hot key is enabled.
-	@discussion Returns <tt>YES</tt> if the hot key is registered.
-	@result <tt>YES</tt> if enabled.
- */
-- (BOOL)isEnabled;
-
-/*!
-	@method target
-	@abstract Get the hot key event target.
-	@discussion Returns the object that is sent the key pressed and key released hot key events, see the methods <tt>-selector</tt>, <tt>-selectorReleased</tt> and <tt>selectorPressed</tt>.
-	@result The target object.
- */
-- (id)target;
-
-/*!
-	@method selector
-	@abstract The selector for a key released event.
-	@discussion This is the selector sent when the hot key combination for the reciever is released. This is the same selector has returned from the method <tt>[NDHotKeyEvent selectorReleased]</tt>
-	@result The method selector.
- */
-- (SEL)selector;
-
-/*!
-	@method selectorReleased
-	@abstract The selector for a key released event.
-	@discussion This is the selector sent when the hot key combination for the reciever is released. This is the same selector has returned from the method <tt>[NDHotKeyEvent selector]</tt>
-	@result The method selector.
- */
-- (SEL)selectorReleased;
-
-/*!
-	@method selectorPressed
-	@abstract The selector for a key pressed event.
-	@discussion This is the selector sent when the hot key combination for the reciever is pressed.
-	@result The method selector.
- */
-- (SEL)selectorPressed;
-
-/*!
-	@method currentEventType
-	@abstract Get the current hot key event type.
-	@discussion This value returns what event last occured. Can be used in your target when it is sent a event message to find out what event occured, possible values are
-	<blockquote>
-		<table border = "1"  width = "90%">
-			<thead><tr><th>Value</th><th>Description</th></tr></thead>
-			<tr><td align = "center"><tt>NDHotKeyNoEvent</tt></td><td>The hot key has not been pressed yet.</td></tr>
-			<tr><td align = "center"><tt>NDHotKeyPressedEvent</tt></td><td>The hot key was pressed last.</td></tr>
-			<tr><td align = "center"><tt>NDHotKeyReleasedEvent</tt></td><td>The hot key was released last.</td></tr>
-		</table>
-	</blockquote>
-	@result The last event type.
- */
-- (int)currentEventType;
-
-/*!
-	@method setTarget:selector:
-	@abstract Set the hot key target.
-	@discussion Set the target object and selector to be sent when the hot key is released. The target needs to either respond to the method represented by the selector <tt>selector</tt> or to the method <tt>makeObjectsPerformSelector:withObject:</tt> in which case the method <tt>makeObjectsPerformSelector:withObject:</tt> is invoked with the selector <tt>selector</tt>, for example <tt>NSArray</tt>
-	@param target The traget object or a collection (for example <tt>NSArray</tt>) of target.
-	@param selector The selector.
-	@result returns <tt>YES</tt> if successful.
- */
-- (BOOL)setTarget:(id)target selector:(SEL)selector;
-
-/*!
-	@method setTarget:selectorReleased:selectorPressed:
-	@abstract Set the hot key target.
-	@discussion Set the target object and selector to be sent when the hot key is pressed and wehn it is released. The target needs to either respond to the method represented by the selector <tt>selector</tt> or to the method <tt>makeObjectsPerformSelector:withObject:</tt> in which case the method <tt>makeObjectsPerformSelector:withObject:</tt> is invoked with the selector <tt>selector</tt>, for example <tt>NSArray</tt>
-	@param target The traget object or a collection (for example <tt>NSArray</tt>) of target.
-	@param selectorReleased The key released selector.
-	@param selectorPressed The key pressed selector.
-	@result returns <tt>YES</tt> if successful.
- */
-- (BOOL)setTarget:(id)target selectorReleased:(SEL)selectorReleased selectorPressed:(SEL)selectorPressed;
-
-/*!
-	@method performHotKeyReleased
-	@abstract Invoke the target with the release selector.
-	@discussion Use to send the selector for a release event, though this method can be called by you.
- */
-- (void)performHotKeyReleased;
-
-/*!
-	@method performHotKeyPressed
-	@abstract Invoke the target with the press selector.
-	@discussion Use to send the selector for a presse event, though this method can be called by you.
- */
-- (void)performHotKeyPressed;
-
-/*!
-	@method keyCode
-	@abstract Get the hot key key code.
-	@discussion The key code for the hot key, this is hardware specific.
-	@result The key code.
- */
-- (UInt16)keyCode;
-
-/*!
-	@method character
-	@abstract Get the hot key character.
-	@discussion This is the character for the key code, without modifier keys. The character is for display purposes only and dose not determine the key code.
-	@result A uni code character.
- */
-- (unichar)character;
-
-/*!
-	@method modifierFlags
-	@abstract Get the hot key modifer key flags.
-	@discussion The <tt>modifierFlags</tt> can be a bitwise and combination of <tt>NSControlKeyMask</tt>, <tt>NSAlternateKeyMask</tt>, <tt>NSShiftKeyMask</tt>, and <tt>NSCommandKeyMask</tt>.
-	@result The modifer key flags.
- */
-- (NSUInteger)modifierFlags;
-
-/*!
-	@method hotKeyId
-	@abstract Get the hot key id.
-	@discussion The id is how Apples 'Carbon Event Manager' keeps track of hot keys, if you want to use apples Hot Key function directly with <tt>NDHotKeyEvent</tt> then you can use the value returned from this method.
- */
-- (UInt32)hotKeyId;
-
-/*!
-	@method stringValue
-	@abstract Get a string got the hot keys.
-	@discussion This is a string that can be used for display purposes.
-	@result A <tt>NSString</tt>
- */
-- (NSString *)stringValue;
-
-/*!
-	@methodgroup Deprecated Methods
- */
-
-/*!
-	@method getHotKeyForKeyCode:modifierFlags:
- */
-+ (NDHotKeyEvent *)getHotKeyForKeyCode:(UInt16)keyCode character:(unichar)aChar modifierFlags:(NSUInteger)modifierFlags DEPRECATED_ATTRIBUTE;
-/*!
-	@method hotKeyWithKeyCode:character:modifierFlags:
- */
-+ (id)hotKeyWithKeyCode:(UInt16)keyCode character:(unichar)aChar modifierFlags:(NSUInteger)modifer DEPRECATED_ATTRIBUTE;
-/*!
-	@method hotKeyWithKeyCode:character:modifierFlags:target:selector:
- */
-+ (id)hotKeyWithKeyCode:(UInt16)keyCode character:(unichar)aChar modifierFlags:(NSUInteger)modifer target:(id)target selector:(SEL)selector DEPRECATED_ATTRIBUTE;
-/*!
-	@method initWithKeyCode:character:modifierFlags:target:selector:
- */
-- (id)initWithKeyCode:(UInt16)keyCode character:(unichar)aChar modifierFlags:(NSUInteger)modifer target:(id)target selector:(SEL)selector DEPRECATED_ATTRIBUTE;
-/*!
-	@method initWithKeyCode:character:modifierFlags
- */
-- (id)initWithKeyCode:(UInt16)keyCode character:(unichar)aChar modifierFlags:(NSUInteger)modifer DEPRECATED_ATTRIBUTE;
-
-@end
-
-/*!
-	@protocol NSObject(NDHotKeyEventTragetWillChange)
-	@abstract Informal protocol used to inform a <tt>NDHotKeyEvent</tt> target of events.
-	@discussion The informal protocol <tt>NDHotKeyEventTragetWillChange</tt> defines a method used to notify a <tt>NDHotKeyEvent</tt> target that the target will change.
- */
-@interface NSObject (NDHotKeyEventTragetWillChange)
-
-/*!
-	@method targetWillChangeToObject:forHotKeyEvent:
-	@abstract Message sent to a target object to inform it that the target is going to change.
-	@discussion This method can be used to notify the receiver that it will no longer be the target for a <tt>NDHotKeyEvent</tt> or used to prevent the target from changing by returning <tt>NO</tt>
-	@param target The new target for the <tt>NDHotKeyEvent</tt>  or a collection (for example <tt>NSArray</tt>) of target.
-	@param hotKeyEvent The <tt>NDHotKeyEvent</tt> for which the target is changing.
-	@result Return <tt>NO</tt> to prevent the target from changing, otherwise return <tt>YES</tt>.
-  */
-- (BOOL)targetWillChangeToObject:(id)target forHotKeyEvent:(NDHotKeyEvent *)hotKeyEvent;
-
-@end

Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m

-/*
-	NDHotKeyEvent.m
-
-	Created by Nathan Day on 21.06.06 under a MIT-style license. 
-	Copyright (c) 2008 Nathan Day
-
-	Permission is hereby granted, free of charge, to any person obtaining a copy
-	of this software and associated documentation files (the "Software"), to deal
-	in the Software without restriction, including without limitation the rights
-	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-	copies of the Software, and to permit persons to whom the Software is
-	furnished to do so, subject to the following conditions:
-
-	The above copyright notice and this permission notice shall be included in
-	all copies or substantial portions of the Software.
-
-	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-	THE SOFTWARE.
- */
-
-#import "NDHotKeyEvent.h"
-#import "NDKeyboardLayout.h"
-
-@interface NDHotKeyEvent ()
-+ (NSHashTable *)allHotKeyEvents;
-- (void)addHotKey;
-- (void)removeHotKey;
-- (BOOL)setCollectiveEnabled:(BOOL)aFlag;
-- (BOOL)collectiveEnable;
-@end
-
-static NSString		* kArchivingKeyCodeKey = @"KeyCodeKey",
-					* kArchivingModifierFlagsKey = @"ModifierFlagsKey",
-					* kArchivingSelectorReleasedCodeKey = @"SelectorReleasedCodeKey",
-					* kArchivingSelectorPressedCodeKey = @"SelectorPressedCodeKey";
-const OSType		NDHotKeyDefaultSignature = 'NDHK';
-
-static OSStatus	switchHotKey( NDHotKeyEvent * self, BOOL aFlag );
-
-/*
- * class implementation NDHotKeyEvent
- */
-@implementation NDHotKeyEvent
-
-#ifdef NDHotKeyEventThreadSafe
-	#warning Thread saftey has been enabled for NDHotKeyEvent class methods
-	#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
-		#define	NDHotKeyEventLock @synchronized([self class]) {
-		#define	NDHotKeyEventUnlock }
-	#else
-		static NSLock				* hotKeysLock = nil;
-		#define	NDHotKeyEventLock [hotKeysLock lock]
-		#define	NDHotKeyEventUnlock [hotKeysLock unlock]
-	#endif
-#else
-	#warning The NDHotKeyEvent class methods are NOT thread safe
-	#define	NDHotKeyEventLock // lock
-	#define	NDHotKeyEventUnlock // unlock
-#endif
-
-static NSHashTable		* allHotKeyEvents = NULL;
-static EventHandlerRef	hotKeysEventHandler = NULL;
-static OSType			signature = 0;
-
-static pascal OSErr eventHandlerCallback( EventHandlerCallRef anInHandlerCallRef, EventRef anInEvent, void * self );
-
-static NSUInteger hashValueHashFunction( NSHashTable * aTable, const void * aHotKeyEvent );
-static BOOL isEqualHashFunction( NSHashTable * aTable, const void * aFirstHotKeyEvent, const void * aSecondHotKeyEvent);
-static NSString * describeHashFunction( NSHashTable * aTable, const void * aHotKeyEvent );
-
-UInt32 _idForKeyCodeAndModifer( UInt16 aKeyCode, NSUInteger aModFlags )
-{
-	return aKeyCode | aModFlags;
-}
-
-void _getKeyCodeAndModiferForId( UInt32 anId, UInt16 *aKeyCode, NSUInteger *aModFlags )
-{
-	*aModFlags = NSDeviceIndependentModifierFlagsMask&anId;
-	*aKeyCode = (UInt16)anId;
-}
-
-struct HotKeyMappingEntry
-{
-	UInt32				hotKeyId;
-	NDHotKeyEvent		* hotKeyEvent;
-};
-
-/*
- * +install
- */
-+ (BOOL)install
-{
-	if( hotKeysEventHandler == NULL )
-	{
-		NSHashTable *		theHotKeyEvents = [self allHotKeyEvents];
-		EventTypeSpec		theTypeSpec[] =
-		{
-			{ kEventClassKeyboard, kEventHotKeyPressed },
-			{ kEventClassKeyboard, kEventHotKeyReleased }
-		};
-		
-		NDHotKeyEventLock;
-		if( theHotKeyEvents != nil && hotKeysEventHandler == NULL )
-		{
-			if( InstallEventHandler( GetEventDispatcherTarget(), NewEventHandlerUPP((EventHandlerProcPtr)eventHandlerCallback), 2, theTypeSpec, theHotKeyEvents, &hotKeysEventHandler ) != noErr )
-				NSLog(@"Could not install Event handler");
-		}
-		NDHotKeyEventUnlock;
-	}
-	
-	return hotKeysEventHandler != NULL;
-}
-
-+ (void)uninstall
-{
-	if( hotKeysEventHandler != NULL )
-		RemoveEventHandler( hotKeysEventHandler );
-}
-
-/*
- * +initialize:
- */
-+ (void)initialize
-{
-	[NDHotKeyEvent setVersion:1];			// the character attribute has been removed
-#ifdef NDHotKeyEventThreadSafe
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
-	while( hotKeysLock == nil )
-	{
-		NSLock		* theInstance = [[NSLock alloc] init];
-
-		if( !CompareAndSwap( nil, (unsigned long int)theInstance, (unsigned long int*)&hotKeysLock) )
-			[theInstance release];			// did not use instance
-	}
-#endif
-#endif
-}
-
-/*
- * +setSignature:
- */
-+ (void)setSignature:(OSType)aSignature
-{
-	NSAssert( signature == 0 || aSignature == signature, @"The signature used by NDHotKeyEvent can only be set once safely" );
-	signature = aSignature;
-}
-
-/*
- * +signature
- */
-+ (OSType)signature
-{
-	signature = signature ? signature : NDHotKeyDefaultSignature;
-	return signature;
-}
-
-/*
- * +setAllEnabled:
- */
-+ (BOOL)setAllEnabled:(BOOL)aFlag
-{
-	BOOL				theAllSucceeded = YES;
-	NSHashTable		* theHashTable = [NDHotKeyEvent allHotKeyEvents];
-
-	/*
-	 * need to install before to make sure the method 'setCollectiveEnabled:'
-	 * doesn't try install since install tries to aquire the lock 'hotKeysLock'
-	 */
-	if( theHashTable && [NDHotKeyEvent install] )
-	{
-		NSHashEnumerator			theEnumerator;
-		struct HotKeyMappingEntry	* theHotKeyMapEntry;
-		NDHotKeyEventLock;
-			theEnumerator =  NSEnumerateHashTable( theHashTable );
-
-			while( (theHotKeyMapEntry = (struct HotKeyMappingEntry*)NSNextHashEnumeratorItem(&theEnumerator) ) )
-			{
-				if( ![theHotKeyMapEntry->hotKeyEvent setCollectiveEnabled:aFlag] )
-					theAllSucceeded = NO;
-			}
-
-			NSEndHashTableEnumeration( &theEnumerator );
-		NDHotKeyEventUnlock;
-	}
-
-	return theAllSucceeded;
-}
-
-/*
- * +isEnabledKeyCharacter:modifierFlags:
- */
-+ (BOOL)isEnabledKeyCharacter:(unichar)aKeyCharacter modifierFlags:(NSUInteger)aModifierFlags
-{
-	return [[self findHotKeyForKeyCode:[[NDKeyboardLayout keyboardLayout] keyCodeForCharacter:aKeyCharacter numericPad:(aModifierFlags&NSNumericPadKeyMask) != 0] modifierFlags:aModifierFlags] isEnabled];
-}
-
-/*
- * +isEnabledKeyCode:modifierFlags:
- */
-+ (BOOL)isEnabledKeyCode:(UInt16)aKeyCode modifierFlags:(NSUInteger)aModifierFlags
-{
-	return [[self findHotKeyForKeyCode:aKeyCode modifierFlags:aModifierFlags] isEnabled];
-}
-
-+ (NDHotKeyEvent *)getHotKeyForKeyCharacter:(unichar)aKeyCharacter modifierFlags:(NSUInteger)aModifierFlags
-{
-	return [self getHotKeyForKeyCode:[[NDKeyboardLayout keyboardLayout] keyCodeForCharacter:aKeyCharacter numericPad:(aModifierFlags&NSNumericPadKeyMask) != 0] modifierFlags:aModifierFlags];
-}
-
-/*
- * +getHotKeyForKeyCode:character:modifierFlags:
- */
-+ (NDHotKeyEvent *)getHotKeyForKeyCode:(UInt16)aKeyCode modifierFlags:(NSUInteger)aModifierFlags
-{
-	NDHotKeyEvent		* theHotKey = nil;
-
-	theHotKey = [self findHotKeyForKeyCode:aKeyCode modifierFlags:aModifierFlags];
-	return theHotKey ? theHotKey : [self hotKeyWithKeyCode:aKeyCode modifierFlags:aModifierFlags];
-}
-
-+ (NDHotKeyEvent *)findHotKeyForKeyCharacter:(unichar)aKeyCharacter modifierFlags:(NSUInteger)aModifierFlags
-{
-	return [self findHotKeyForKeyCode:[[NDKeyboardLayout keyboardLayout] keyCodeForCharacter:aKeyCharacter numericPad:(aModifierFlags&NSNumericPadKeyMask) != 0] modifierFlags:aModifierFlags];
-}
-
-/*
- * +findHotKeyForKeyCode:modifierFlags:
- */
-+ (NDHotKeyEvent *)findHotKeyForKeyCode:(UInt16)aKeyCode modifierFlags:(NSUInteger)aModifierFlags
-{
-#if 1
-	return [self findHotKeyForId:_idForKeyCodeAndModifer(aKeyCode, aModifierFlags)];
-#else
-	NDHotKeyEvent		* theFoundHotKeyEvent = nil;
-	NSHashTable			* theHashTable = [NDHotKeyEvent allHotKeyEvents];
-
-	if( theHashTable )
-	{		
-		NSHashEnumerator			theEnumerator =  NSEnumerateHashTable( allHotKeyEvents );
-		struct HotKeyMappingEntry	* theHotKeyMapEntry;
-		NDHotKeyEventLock;
-		
-		while( (theHotKeyMapEntry = (struct HotKeyMappingEntry*)NSNextHashEnumeratorItem(&theEnumerator) ) )
-		{
-			NDHotKeyEvent		* theHotKeyEvent = theHotKeyMapEntry->hotKeyEvent;
-			if( [theHotKeyEvent keyCode] == aKeyCode && [theHotKeyEvent modifierFlags] == aModifierFlags )
-			{
-				theFoundHotKeyEvent = theHotKeyEvent;
-				break;
-			}
-		}
-		
-		NSEndHashTableEnumeration( &theEnumerator );
-		NDHotKeyEventUnlock;
-	}
-	return theFoundHotKeyEvent;
-#endif
-}
-
-/*
- * +findHotKeyForKeyCode:modifierFlags:
- */
-+ (NDHotKeyEvent *)findHotKeyForId:(UInt32)anID
-{
-	struct HotKeyMappingEntry	* theFoundEntry = NULL;
-	NSHashTable					* theHashTable = [NDHotKeyEvent allHotKeyEvents];
-	
-	if( theHashTable )
-	{
-		struct HotKeyMappingEntry		theDummyEntry = {anID,nil};
-		
-		NDHotKeyEventLock;
-		theFoundEntry = NSHashGet( theHashTable, (void*)&theDummyEntry);
-		if( theFoundEntry != NULL )
-			[[theFoundEntry->hotKeyEvent retain] autorelease];
-		NDHotKeyEventUnlock;
-	}
-	
-	return (theFoundEntry) ? theFoundEntry->hotKeyEvent : nil;
-}
-
-/*
- * +hotKeyWithEvent:
- */
-+ (id)hotKeyWithEvent:(NSEvent *)anEvent
-{
-	return [[[self alloc] initWithEvent:anEvent] autorelease];
-}
-
-/*
- * +hotKeyWithEvent::target:selector:
- */
-+ (id)hotKeyWithEvent:(NSEvent *)anEvent target:(id)aTarget selector:(SEL)aSelector
-{
-	return [[[self alloc] initWithEvent:anEvent target:aTarget selector:aSelector] autorelease];
-}