Adding HotKeys to ITKit... This is the new HotKey code by Quentin of
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 4 Sep 2003 01:36:01 +0000 (01:36 +0000)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 4 Sep 2003 01:36:01 +0000 (01:36 +0000)
RogueAmoeba, added to ITKit with his permission. Also added support for
non-modifier FKeys as global HotKeys.

39 files changed:
EffectSupport.txt
English.lproj/ITKeyCodes.plist [new file with mode: 0755]
English.lproj/ITKeyComboPanel.nib/classes.nib [new file with mode: 0755]
English.lproj/ITKeyComboPanel.nib/info.nib [new file with mode: 0755]
English.lproj/ITKeyComboPanel.nib/objects.nib [new file with mode: 0755]
English.lproj/ITKeyComboPanel.nib/objects.nib~ [new file with mode: 0755]
English.lproj/Localizable.strings [new file with mode: 0755]
French.lproj/ITKeyCodes.plist [new file with mode: 0755]
French.lproj/ITKeyComboPanel.nib/classes.nib [new file with mode: 0755]
French.lproj/ITKeyComboPanel.nib/info.nib [new file with mode: 0755]
French.lproj/ITKeyComboPanel.nib/keyedobjects.nib [new file with mode: 0755]
French.lproj/ITKeyComboPanel.nib/keyedobjects.nib~ [new file with mode: 0755]
French.lproj/Localizable.strings [new file with mode: 0755]
German.lproj/ITKeyCodes.plist [new file with mode: 0755]
German.lproj/ITKeyComboPanel.nib/classes.nib [new file with mode: 0755]
German.lproj/ITKeyComboPanel.nib/info.nib [new file with mode: 0755]
German.lproj/ITKeyComboPanel.nib/objects.nib [new file with mode: 0755]
German.lproj/ITKeyComboPanel.nib/objects.nib~ [new file with mode: 0755]
German.lproj/Localizable.strings [new file with mode: 0755]
Graphics/ITKeyboardIcon.tiff [new file with mode: 0755]
Graphics/URLTextViewHand.tiff [new file with mode: 0755]
ITHotKey.h [new file with mode: 0755]
ITHotKey.m [new file with mode: 0755]
ITHotKeyCenter.h [new file with mode: 0755]
ITHotKeyCenter.m [new file with mode: 0755]
ITKeyBroadcaster.h [new file with mode: 0755]
ITKeyBroadcaster.m [new file with mode: 0755]
ITKeyCombo.h [new file with mode: 0755]
ITKeyCombo.m [new file with mode: 0755]
ITKeyComboPanel.h [new file with mode: 0755]
ITKeyComboPanel.m [new file with mode: 0755]
ITKit.h
Japanese.lproj/ITKeyCodes.plist [new file with mode: 0755]
Japanese.lproj/ITKeyComboPanel.nib/classes.nib [new file with mode: 0755]
Japanese.lproj/ITKeyComboPanel.nib/info.nib [new file with mode: 0755]
Japanese.lproj/ITKeyComboPanel.nib/objects.nib [new file with mode: 0755]
Japanese.lproj/Localizable.strings [new file with mode: 0755]
Showcase/English.lproj/InfoPlist.strings
Showcase/main.m

index d380500..ca86e87 100755 (executable)
@@ -1,4 +1,4 @@
-POSITIONS:
+þÿPOSITIONS:
 
 +-------------------+
 | A       B       C |
@@ -32,4 +32,3 @@ Pos. | Possible Effects      + = Maybe (Future)
   H  | 0   1   2   -   +
   I  | 0   1   2   3   4
 
-
diff --git a/English.lproj/ITKeyCodes.plist b/English.lproj/ITKeyCodes.plist
new file mode 100755 (executable)
index 0000000..40d44b6
--- /dev/null
@@ -0,0 +1,103 @@
+{\r
+       0 = "A";\r
+       1 = "S";\r
+       2 = "D";\r
+       3 = "F";\r
+       4 = "H";\r
+       5 = "G";\r
+       6 = "Z";\r
+       7 = "X";\r
+       8 = "C";\r
+       9 = "V";\r
+       10 = "$";\r
+       11 = "B";\r
+       12 = "Q";\r
+       13 = "W";\r
+       14 = "E";\r
+       15 = "R";\r
+       16 = "Y";\r
+       17 = "T";\r
+       18 = "1";\r
+       19 = "2";\r
+       20 = "3";\r
+       21 = "4";\r
+       22 = "6";\r
+       23 = "5";\r
+       24 = "=";\r
+       25 = "9";\r
+       26 = "7";\r
+       27 = "-";\r
+       28 = "8";\r
+       29 = "0";\r
+       30 = "\]";\r
+       31 = "O";\r
+       32 = "U";\r
+       33 = "\[";\r
+       34 = "I";\r
+       35 = "P";\r
+       36 = "Return";\r
+       37 = "L";\r
+       38 = "J";\r
+       39 = "\'";\r
+       40 = "K";\r
+       41 = ";";\r
+       42 = "\\";\r
+       43 = ",";\r
+       44 = "\/";\r
+       45 = "N";\r
+       46 = "M";\r
+       47 = ".";\r
+       48 = "Tab";\r
+       49 = "Space";\r
+       50 = "\`";\r
+       51 = "Delete";\r
+       53 = "ESC";\r
+       55 = "Command";\r
+       56 = "Shift";\r
+       57 = "Caps Lock";\r
+       58 = "Option";\r
+       59 = "Control";\r
+       65 = "Pad .";\r
+       67 = "Pad *";\r
+       69 = "Pad +";\r
+       71 = "Clear";\r
+       75 = "Pad /";\r
+       76 = "Pad Enter";\r
+       78 = "Pad -";\r
+       81 = "Pad =";\r
+       82 = "Pad 0";\r
+       83 = "Pad 1";\r
+       84 = "Pad 2";\r
+       85 = "Pad 3";\r
+       86 = "Pad 4";\r
+       87 = "Pad 5";\r
+       88 = "Pad 6";\r
+       89 = "Pad 7";\r
+       91 = "Pad 8";\r
+       92 = "Pad 9";\r
+       96 = "F5";\r
+       97 = "F6";\r
+       98 = "F7";\r
+       99 = "F3";\r
+       100 = "F8";\r
+       101 = "F9";\r
+       103 = "F11";\r
+       105 = "F13";\r
+       107 = "F14";\r
+       109 = "F10";\r
+       111 = "F12";\r
+       113 = "F15";\r
+       114 = "Ins";\r
+       115 = "Home";\r
+       116 = "Page Up";\r
+       117 = "Del";\r
+       118 = "F4";\r
+       119 = "End";\r
+       120 = "F2";\r
+       121 = "Page Down";\r
+       122 = "F1";\r
+       123 = "Left Arrow";\r
+       124 = "Right Arrow";\r
+       125 = "Down Arrow";\r
+       126 = "Up Arrow";\r
+}
\ No newline at end of file
diff --git a/English.lproj/ITKeyComboPanel.nib/classes.nib b/English.lproj/ITKeyComboPanel.nib/classes.nib
new file mode 100755 (executable)
index 0000000..0ab0cc6
--- /dev/null
@@ -0,0 +1,18 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = ITKeyBroadcaster; LANGUAGE = ObjC; SUPERCLASS = NSButton; }, 
+        {
+            ACTIONS = {cancel = id; clear = id; ok = id; }; 
+            CLASS = ITKeyComboPanel; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {
+                mComboField = NSTextField; 
+                mKeyBcaster = ITKeyBroadcaster; 
+                mTitleField = NSTextField; 
+            }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/English.lproj/ITKeyComboPanel.nib/info.nib b/English.lproj/ITKeyComboPanel.nib/info.nib
new file mode 100755 (executable)
index 0000000..d6ed0ab
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>109 47 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>291.0</string>
+       <key>IBGroupedObjects</key>
+       <dict>
+               <key>10</key>
+               <array>
+                       <string>22</string>
+                       <string>27</string>
+               </array>
+       </dict>
+       <key>IBLastGroupID</key>
+       <string>11</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>19</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>6L60</string>
+</dict>
+</plist>
diff --git a/English.lproj/ITKeyComboPanel.nib/objects.nib b/English.lproj/ITKeyComboPanel.nib/objects.nib
new file mode 100755 (executable)
index 0000000..570f426
Binary files /dev/null and b/English.lproj/ITKeyComboPanel.nib/objects.nib differ
diff --git a/English.lproj/ITKeyComboPanel.nib/objects.nib~ b/English.lproj/ITKeyComboPanel.nib/objects.nib~
new file mode 100755 (executable)
index 0000000..645b6c3
Binary files /dev/null and b/English.lproj/ITKeyComboPanel.nib/objects.nib~ differ
diff --git a/English.lproj/Localizable.strings b/English.lproj/Localizable.strings
new file mode 100755 (executable)
index 0000000..57d9d74
--- /dev/null
@@ -0,0 +1,75 @@
+/* AppleScript Error Alert */
+"%@\nFound at character index, length: %d, %d" = "%@\nFound at character index, length: %d, %d";
+"AppleScript Error %@" = "AppleScript Error %@";
+
+/* File Size Abbrev. */
+"b" = "b";
+"GB" = "GB";
+"KB" = "KB";
+"MB" = "MB";
+
+/* General Error Alert */
+"Details..." = "Details...";
+"Error" = "Error";
+"Exception Details" = "Exception Details";
+"Name: %@\nReason: %@\nStack Trace:\n%@\n\nInfo:\n%@\n" = "Name: %@\nReason: %@\nStack Trace:\n%@\n\nInfo:\n%@\n";
+
+/* Hot Keys: Key Combo text for 'empty' combo */
+"(None)" = "(None)";
+
+/* Isis: Alert Body */
+"The latest version of %@ is %@. Choose \"More Info\" to open a web page from which you can download or get information about this new version." = "The latest version of %@ is %@. Choose \"More Info\" to open a web page from which you can download or get information about this new version.";
+
+/* Isis: Alert Title */
+"A new version of %@ is now available." = "A new version of %@ is now available.";
+"You're currently using the most up-to-date version of %@." = "You're currently using the most up-to-date version of %@.";
+
+/* Isis: Button */
+"Download now" = "Download now";
+"More Info..." = "More Info...";
+"Update Later" = "Update Later";
+
+/* Isis: Error Msg */
+"Software Update Failed: Couldn't load remote version info" = "Software Update Failed: Couldn't load remote version info";
+"Software Update Failed: Failed to find bundle with given identifier" = "Software Update Failed: Failed to find bundle with given identifier";
+
+/* Noise Alert
+   AppleScript Error Alert
+   General Error Alert
+   Trash Alert
+   Isis: Button */
+"OK" = "OK";
+
+/* Noise Alert */
+"Do Not Adjust Your Speakers" = "Do Not Adjust Your Speakers";
+"Purchase" = "Purchase";
+"You are using an UNREGISTERED copy of %@. Because of this, the quality of the audio being hijacked will now begin deteriorating noticeably. Nothing is wrong with your speakers - you simply need to register to retain completely full-quality audio" = "You are using an UNREGISTERED copy of %@. Because of this, the quality of the audio being hijacked will now begin deteriorating noticeably. Nothing is wrong with your speakers - you simply need to register to retain completely full-quality audio";
+
+/* Registration Status */
+"Be sure to enter your name and code exactly as they were sent to you." = "Be sure to enter your name and code exactly as they were sent to you.";
+"Thanks for registering!" = "Thanks for registering!";
+
+/* Timers:  */
+"Everyday" = "Everyday";
+"Weekdays" = "Weekdays";
+"Weekends" = "Weekends";
+
+/* Timers: Abbrev. */
+"Fr" = "Fr";
+"Mo" = "Mo";
+"Sa" = "Sa";
+"Su" = "Su";
+"Th" = "Th";
+"Tu" = "Tu";
+"We" = "We";
+
+/* Timers: No Days Selected */
+"Never" = "Never";
+
+/* Track Time Formatter: Time data is not avaliable */
+"N/A" = "N/A";
+
+/* Trash Alert */
+"This copy of %@ appears to be in the Trash" = "This copy of %@ appears to be in the Trash";
+"You probably want to be running some other copy of %@, and not this one." = "You probably want to be running some other copy of %@, and not this one.";
+
diff --git a/French.lproj/ITKeyCodes.plist b/French.lproj/ITKeyCodes.plist
new file mode 100755 (executable)
index 0000000..40d44b6
--- /dev/null
@@ -0,0 +1,103 @@
+{\r
+       0 = "A";\r
+       1 = "S";\r
+       2 = "D";\r
+       3 = "F";\r
+       4 = "H";\r
+       5 = "G";\r
+       6 = "Z";\r
+       7 = "X";\r
+       8 = "C";\r
+       9 = "V";\r
+       10 = "$";\r
+       11 = "B";\r
+       12 = "Q";\r
+       13 = "W";\r
+       14 = "E";\r
+       15 = "R";\r
+       16 = "Y";\r
+       17 = "T";\r
+       18 = "1";\r
+       19 = "2";\r
+       20 = "3";\r
+       21 = "4";\r
+       22 = "6";\r
+       23 = "5";\r
+       24 = "=";\r
+       25 = "9";\r
+       26 = "7";\r
+       27 = "-";\r
+       28 = "8";\r
+       29 = "0";\r
+       30 = "\]";\r
+       31 = "O";\r
+       32 = "U";\r
+       33 = "\[";\r
+       34 = "I";\r
+       35 = "P";\r
+       36 = "Return";\r
+       37 = "L";\r
+       38 = "J";\r
+       39 = "\'";\r
+       40 = "K";\r
+       41 = ";";\r
+       42 = "\\";\r
+       43 = ",";\r
+       44 = "\/";\r
+       45 = "N";\r
+       46 = "M";\r
+       47 = ".";\r
+       48 = "Tab";\r
+       49 = "Space";\r
+       50 = "\`";\r
+       51 = "Delete";\r
+       53 = "ESC";\r
+       55 = "Command";\r
+       56 = "Shift";\r
+       57 = "Caps Lock";\r
+       58 = "Option";\r
+       59 = "Control";\r
+       65 = "Pad .";\r
+       67 = "Pad *";\r
+       69 = "Pad +";\r
+       71 = "Clear";\r
+       75 = "Pad /";\r
+       76 = "Pad Enter";\r
+       78 = "Pad -";\r
+       81 = "Pad =";\r
+       82 = "Pad 0";\r
+       83 = "Pad 1";\r
+       84 = "Pad 2";\r
+       85 = "Pad 3";\r
+       86 = "Pad 4";\r
+       87 = "Pad 5";\r
+       88 = "Pad 6";\r
+       89 = "Pad 7";\r
+       91 = "Pad 8";\r
+       92 = "Pad 9";\r
+       96 = "F5";\r
+       97 = "F6";\r
+       98 = "F7";\r
+       99 = "F3";\r
+       100 = "F8";\r
+       101 = "F9";\r
+       103 = "F11";\r
+       105 = "F13";\r
+       107 = "F14";\r
+       109 = "F10";\r
+       111 = "F12";\r
+       113 = "F15";\r
+       114 = "Ins";\r
+       115 = "Home";\r
+       116 = "Page Up";\r
+       117 = "Del";\r
+       118 = "F4";\r
+       119 = "End";\r
+       120 = "F2";\r
+       121 = "Page Down";\r
+       122 = "F1";\r
+       123 = "Left Arrow";\r
+       124 = "Right Arrow";\r
+       125 = "Down Arrow";\r
+       126 = "Up Arrow";\r
+}
\ No newline at end of file
diff --git a/French.lproj/ITKeyComboPanel.nib/classes.nib b/French.lproj/ITKeyComboPanel.nib/classes.nib
new file mode 100755 (executable)
index 0000000..0ab0cc6
--- /dev/null
@@ -0,0 +1,18 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = ITKeyBroadcaster; LANGUAGE = ObjC; SUPERCLASS = NSButton; }, 
+        {
+            ACTIONS = {cancel = id; clear = id; ok = id; }; 
+            CLASS = ITKeyComboPanel; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {
+                mComboField = NSTextField; 
+                mKeyBcaster = ITKeyBroadcaster; 
+                mTitleField = NSTextField; 
+            }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/French.lproj/ITKeyComboPanel.nib/info.nib b/French.lproj/ITKeyComboPanel.nib/info.nib
new file mode 100755 (executable)
index 0000000..28d44b9
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>109 47 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>291.0</string>
+       <key>IBGroupedObjects</key>
+       <dict>
+               <key>11</key>
+               <array>
+                       <string>22</string>
+                       <string>27</string>
+               </array>
+       </dict>
+       <key>IBLastGroupID</key>
+       <string>12</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>19</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>6L60</string>
+</dict>
+</plist>
diff --git a/French.lproj/ITKeyComboPanel.nib/keyedobjects.nib b/French.lproj/ITKeyComboPanel.nib/keyedobjects.nib
new file mode 100755 (executable)
index 0000000..70e77b2
Binary files /dev/null and b/French.lproj/ITKeyComboPanel.nib/keyedobjects.nib differ
diff --git a/French.lproj/ITKeyComboPanel.nib/keyedobjects.nib~ b/French.lproj/ITKeyComboPanel.nib/keyedobjects.nib~
new file mode 100755 (executable)
index 0000000..682f3a9
Binary files /dev/null and b/French.lproj/ITKeyComboPanel.nib/keyedobjects.nib~ differ
diff --git a/French.lproj/Localizable.strings b/French.lproj/Localizable.strings
new file mode 100755 (executable)
index 0000000..a0a322f
Binary files /dev/null and b/French.lproj/Localizable.strings differ
diff --git a/German.lproj/ITKeyCodes.plist b/German.lproj/ITKeyCodes.plist
new file mode 100755 (executable)
index 0000000..40d44b6
--- /dev/null
@@ -0,0 +1,103 @@
+{\r
+       0 = "A";\r
+       1 = "S";\r
+       2 = "D";\r
+       3 = "F";\r
+       4 = "H";\r
+       5 = "G";\r
+       6 = "Z";\r
+       7 = "X";\r
+       8 = "C";\r
+       9 = "V";\r
+       10 = "$";\r
+       11 = "B";\r
+       12 = "Q";\r
+       13 = "W";\r
+       14 = "E";\r
+       15 = "R";\r
+       16 = "Y";\r
+       17 = "T";\r
+       18 = "1";\r
+       19 = "2";\r
+       20 = "3";\r
+       21 = "4";\r
+       22 = "6";\r
+       23 = "5";\r
+       24 = "=";\r
+       25 = "9";\r
+       26 = "7";\r
+       27 = "-";\r
+       28 = "8";\r
+       29 = "0";\r
+       30 = "\]";\r
+       31 = "O";\r
+       32 = "U";\r
+       33 = "\[";\r
+       34 = "I";\r
+       35 = "P";\r
+       36 = "Return";\r
+       37 = "L";\r
+       38 = "J";\r
+       39 = "\'";\r
+       40 = "K";\r
+       41 = ";";\r
+       42 = "\\";\r
+       43 = ",";\r
+       44 = "\/";\r
+       45 = "N";\r
+       46 = "M";\r
+       47 = ".";\r
+       48 = "Tab";\r
+       49 = "Space";\r
+       50 = "\`";\r
+       51 = "Delete";\r
+       53 = "ESC";\r
+       55 = "Command";\r
+       56 = "Shift";\r
+       57 = "Caps Lock";\r
+       58 = "Option";\r
+       59 = "Control";\r
+       65 = "Pad .";\r
+       67 = "Pad *";\r
+       69 = "Pad +";\r
+       71 = "Clear";\r
+       75 = "Pad /";\r
+       76 = "Pad Enter";\r
+       78 = "Pad -";\r
+       81 = "Pad =";\r
+       82 = "Pad 0";\r
+       83 = "Pad 1";\r
+       84 = "Pad 2";\r
+       85 = "Pad 3";\r
+       86 = "Pad 4";\r
+       87 = "Pad 5";\r
+       88 = "Pad 6";\r
+       89 = "Pad 7";\r
+       91 = "Pad 8";\r
+       92 = "Pad 9";\r
+       96 = "F5";\r
+       97 = "F6";\r
+       98 = "F7";\r
+       99 = "F3";\r
+       100 = "F8";\r
+       101 = "F9";\r
+       103 = "F11";\r
+       105 = "F13";\r
+       107 = "F14";\r
+       109 = "F10";\r
+       111 = "F12";\r
+       113 = "F15";\r
+       114 = "Ins";\r
+       115 = "Home";\r
+       116 = "Page Up";\r
+       117 = "Del";\r
+       118 = "F4";\r
+       119 = "End";\r
+       120 = "F2";\r
+       121 = "Page Down";\r
+       122 = "F1";\r
+       123 = "Left Arrow";\r
+       124 = "Right Arrow";\r
+       125 = "Down Arrow";\r
+       126 = "Up Arrow";\r
+}
\ No newline at end of file
diff --git a/German.lproj/ITKeyComboPanel.nib/classes.nib b/German.lproj/ITKeyComboPanel.nib/classes.nib
new file mode 100755 (executable)
index 0000000..0ab0cc6
--- /dev/null
@@ -0,0 +1,18 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = ITKeyBroadcaster; LANGUAGE = ObjC; SUPERCLASS = NSButton; }, 
+        {
+            ACTIONS = {cancel = id; clear = id; ok = id; }; 
+            CLASS = ITKeyComboPanel; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {
+                mComboField = NSTextField; 
+                mKeyBcaster = ITKeyBroadcaster; 
+                mTitleField = NSTextField; 
+            }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/German.lproj/ITKeyComboPanel.nib/info.nib b/German.lproj/ITKeyComboPanel.nib/info.nib
new file mode 100755 (executable)
index 0000000..b48acd3
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>79 31 356 240 0 0 1024 746 </string>
+       <key>IBFramework Version</key>
+       <string>313.0</string>
+       <key>IBGroupedObjects</key>
+       <dict>
+               <key>10</key>
+               <array>
+                       <string>22</string>
+                       <string>27</string>
+               </array>
+       </dict>
+       <key>IBLastGroupID</key>
+       <string>11</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>19</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>6L60</string>
+</dict>
+</plist>
diff --git a/German.lproj/ITKeyComboPanel.nib/objects.nib b/German.lproj/ITKeyComboPanel.nib/objects.nib
new file mode 100755 (executable)
index 0000000..b88f646
Binary files /dev/null and b/German.lproj/ITKeyComboPanel.nib/objects.nib differ
diff --git a/German.lproj/ITKeyComboPanel.nib/objects.nib~ b/German.lproj/ITKeyComboPanel.nib/objects.nib~
new file mode 100755 (executable)
index 0000000..b8cc980
Binary files /dev/null and b/German.lproj/ITKeyComboPanel.nib/objects.nib~ differ
diff --git a/German.lproj/Localizable.strings b/German.lproj/Localizable.strings
new file mode 100755 (executable)
index 0000000..0e7f77c
--- /dev/null
@@ -0,0 +1,39 @@
+"%@\nFound at character index, length: %d, %d" = "%@\nFound at character index, length: %d, %d"; 
+"(None)" = "(Keine)"; 
+"A new version of %@ is now available." = "Eine neue Version von%@ ist verf\U00fcgbar."; 
+"AppleScript Error %@" = "AppleScript Fehler %@"; 
+"Be sure to enter your name and code exactly as they were sent to you." = "Geben Sie Namen und Code exakt so ein, wie er Ihnen zugeschickt wurde."; 
+"Details..." = "Details..."; 
+"Do Not Adjust Your Speakers" = "Passen Sie nicht Ihre Lautsprecher an"; 
+"Download now" = "Jetzt herunterladen"; 
+Error = Fehler; 
+Everyday = "T\U00e4glich"; 
+"Exception Details" = Ausnahmedetails; 
+Fr = Fr; 
+GB = GB; 
+KB = KB; 
+MB = MB; 
+Mo = Mo; 
+"More Info..." = "Mehr Info..."; 
+"N/A" = "N/V"; 
+"Name: %@\nReason: %@\nStack Trace:\n%@\n\nInfo:\n%@\n" = "Name: %@\nReason: %@\nStack Trace:\n%@\n\nInfo:\n%@\n"; 
+Never = Nie; 
+OK = OK; 
+Purchase = Kaufen; 
+Sa = Sa; 
+"Software Update Failed: Couldn't load remote version info" = "Software Aktualisierung fehlgeschlagen: Konnte Remote Version nicht auslesen"; 
+"Software Update Failed: Failed to find bundle with given identifier" = "Software Aktualisierung fehlgeschlagen: Konnte Bundle mit \U00fcbermitteltem Identifier nicht finden"; 
+Su = So; 
+Th = Do; 
+"Thanks for registering!" = "Danke f\U00fcr die Registrierung"; 
+"The latest version of %@ is %@. Choose \"More Info\" to open a web page from which you can download or get information about this new version." = "Die letzte Version von %@ ist %@. W\U00e4hlen Sie \"Mehr Info\", um zu einer Webseite zu gelangen von der Sie diese Version herunterladen k\U00f6nnen."; 
+"This copy of %@ appears to be in the Trash" = "Diese Kopie von %@ scheint im Papierkorb zu liegen."; 
+Tu = Di; 
+"Update Later" = "Sp\U00e4ter aktualisieren"; 
+We = Mi; 
+Weekdays = Wochentags; 
+Weekends = "Am Wochenende"; 
+"You are using an UNREGISTERED copy of %@. Because of this, the quality of the audio being hijacked will now begin deteriorating noticeably. Nothing is wrong with your speakers - you simply need to register to retain completely full-quality audio" = "Sie benutzen eine UNREGISTRIERTE Version von %@. Deshalb wird sich die Qualit\U00e4t des \U00fcbernommenen Audiomaterials jetzt h\U00f6rbar verschlechtern. Ihre Lautsprecher sind in Ordnung - Sie m\U00fcssen nur die Software registrieren, um die volle Qualit\U00e4t zur\U00fcck zu bekommen."; 
+"You probably want to be running some other copy of %@, and not this one." = "Sie m\U00f6chten sicherlich eine andere Version von %@ laufen lassen und nicht diese."; 
+"You're currently using the most up-to-date version of %@." = "Sie benutzen zur Zeit die aktuellste Version von %@."; 
+b = B;
diff --git a/Graphics/ITKeyboardIcon.tiff b/Graphics/ITKeyboardIcon.tiff
new file mode 100755 (executable)
index 0000000..b979bda
Binary files /dev/null and b/Graphics/ITKeyboardIcon.tiff differ
diff --git a/Graphics/URLTextViewHand.tiff b/Graphics/URLTextViewHand.tiff
new file mode 100755 (executable)
index 0000000..37a9783
Binary files /dev/null and b/Graphics/URLTextViewHand.tiff differ
diff --git a/ITHotKey.h b/ITHotKey.h
new file mode 100755 (executable)
index 0000000..d654bbc
--- /dev/null
@@ -0,0 +1,35 @@
+//
+//  ITHotKey.h
+//
+//  Created by Quentin Carnicelli on Sat Aug 02 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import "ITKeyCombo.h"
+
+@interface ITHotKey : NSObject
+{
+       NSString*               mName;
+       ITKeyCombo*             mKeyCombo;
+       id                              mTarget;
+       SEL                             mAction;
+}
+
+- (id)init;
+
+- (void)setName: (NSString*)name;
+- (NSString*)name;
+
+- (void)setKeyCombo: (ITKeyCombo*)combo;
+- (ITKeyCombo*)keyCombo;
+
+- (void)setTarget: (id)target;
+- (id)target;
+- (void)setAction: (SEL)action;
+- (SEL)action;
+
+- (void)invoke;
+
+@end
diff --git a/ITHotKey.m b/ITHotKey.m
new file mode 100755 (executable)
index 0000000..bf411f9
--- /dev/null
@@ -0,0 +1,91 @@
+//
+//  ITHotKey.m
+//
+//  Created by Quentin Carnicelli on Sat Aug 02 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import "ITHotKey.h"
+
+#import "ITHotKeyCenter.h"
+#import "ITKeyCombo.h"
+
+@implementation ITHotKey
+
+- (id)init
+{
+       self = [super init];
+       
+       if( self )
+       {
+               [self setKeyCombo: [ITKeyCombo clearKeyCombo]];
+       }
+       
+       return self;
+}
+
+- (void)dealloc
+{
+       [mName release];
+       [mKeyCombo release];
+       
+       [super dealloc];
+}
+
+- (NSString*)description
+{
+       return [NSString stringWithFormat: @"<%@: %@>", NSStringFromClass( [self class] ), [self keyCombo]];
+}
+
+#pragma mark -
+
+- (void)setKeyCombo: (ITKeyCombo*)combo
+{
+       [combo retain];
+       [mKeyCombo release];
+       mKeyCombo = combo;
+}
+
+- (ITKeyCombo*)keyCombo
+{
+       return mKeyCombo;
+}
+
+- (void)setName: (NSString*)name
+{
+       [name retain];
+       [mName release];
+       mName = name;
+}
+
+- (NSString*)name
+{
+       return mName;
+}
+
+- (void)setTarget: (id)target
+{
+       mTarget = target;
+}
+
+- (id)target
+{
+       return mTarget;
+}
+
+- (void)setAction: (SEL)action
+{
+       mAction = action;
+}
+
+- (SEL)action
+{
+       return mAction;
+}
+
+- (void)invoke
+{
+       [mTarget performSelector: mAction withObject: self];
+}
+
+@end
diff --git a/ITHotKeyCenter.h b/ITHotKeyCenter.h
new file mode 100755 (executable)
index 0000000..e984bc5
--- /dev/null
@@ -0,0 +1,27 @@
+//
+//  ITHotKeyCenter.h
+//
+//  Created by Quentin Carnicelli on Sat Aug 02 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+@class ITHotKey;
+
+@interface ITHotKeyCenter : NSObject
+{
+       NSMutableDictionary*    mHotKeys; //Keys are NSValue of EventHotKeyRef
+       BOOL                    mEventHandlerInstalled;
+}
+
++ (id)sharedCenter;
+
+- (BOOL)registerHotKey: (ITHotKey*)hotKey;
+- (void)unregisterHotKey: (ITHotKey*)hotKey;
+
+- (NSArray*)allHotKeys;
+
+- (void)sendEvent: (NSEvent*)event;
+
+@end
diff --git a/ITHotKeyCenter.m b/ITHotKeyCenter.m
new file mode 100755 (executable)
index 0000000..ad9c31d
--- /dev/null
@@ -0,0 +1,265 @@
+//
+//  ITHotKeyCenter.m
+//
+//  Created by Quentin Carnicelli on Sat Aug 02 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import "ITHotKeyCenter.h"
+#import "ITHotKey.h"
+#import "ITKeyCombo.h"
+#import <Carbon/Carbon.h>
+
+#if __PROTEIN__
+#import "NSObjectAdditions.h"
+#endif
+
+@interface ITHotKeyCenter (Private)
+- (BOOL)_hasCarbonEventSupport;
+
+- (ITHotKey*)_hotKeyForCarbonHotKey: (EventHotKeyRef)carbonHotKey;
+- (EventHotKeyRef)_carbonHotKeyForHotKey: (ITHotKey*)hotKey;
+
+- (void)_updateEventHandler;
+- (void)_hotKeyDown: (ITHotKey*)hotKey;
+- (void)_hotKeyUp: (ITHotKey*)hotKey;
+static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void* refCon );
+@end
+
+@implementation ITHotKeyCenter
+
+static id _sharedHotKeyCenter = nil;
+
++ (id)sharedCenter
+{
+       if( _sharedHotKeyCenter == nil )
+       {
+               _sharedHotKeyCenter = [[self alloc] init];
+               #if __PROTEIN__
+                       [_sharedHotKeyCenter releaseOnTerminate];
+               #endif
+       }
+       
+       return _sharedHotKeyCenter;
+}
+
+- (id)init
+{
+       self = [super init];
+       
+       if( self )
+       {
+               mHotKeys = [[NSMutableDictionary alloc] init];
+       }
+       
+       return self;
+}
+
+- (void)dealloc
+{
+       [mHotKeys release];
+       [super dealloc];
+}
+
+#pragma mark -
+
+- (BOOL)registerHotKey: (ITHotKey*)hotKey
+{
+       OSStatus err;
+       EventHotKeyID hotKeyID;
+       EventHotKeyRef carbonHotKey;
+       NSValue* key;
+
+       if( [[self allHotKeys] containsObject: hotKey] == YES )
+               [self unregisterHotKey: hotKey];
+       
+       if( [[hotKey keyCombo] isValidHotKeyCombo] == NO )
+               return YES;
+       
+       hotKeyID.signature = 'PTHk';
+       hotKeyID.id = (long)hotKey;
+       
+       err = RegisterEventHotKey(  [[hotKey keyCombo] keyCode],
+                                                               [[hotKey keyCombo] modifiers],
+                                                               hotKeyID,
+                                                               GetEventDispatcherTarget(),
+                                                               nil,
+                                                               &carbonHotKey );
+
+       if( err )
+               return NO;
+
+       key = [NSValue valueWithPointer: carbonHotKey];
+       [mHotKeys setObject: hotKey forKey: key];
+
+       [self _updateEventHandler];
+       
+       return YES;
+}
+
+- (void)unregisterHotKey: (ITHotKey*)hotKey
+{
+       OSStatus err;
+       EventHotKeyRef carbonHotKey;
+       NSValue* key;
+
+       if( [[self allHotKeys] containsObject: hotKey] == NO )
+               return;
+       
+       carbonHotKey = [self _carbonHotKeyForHotKey: hotKey];
+       NSAssert( carbonHotKey != nil, @"" );
+
+       err = UnregisterEventHotKey( carbonHotKey );
+       //Watch as we ignore 'err':
+
+       key = [NSValue valueWithPointer: carbonHotKey];
+       [mHotKeys removeObjectForKey: key];
+       
+       [self _updateEventHandler];
+
+       //See that? Completely ignored
+}
+
+- (NSArray*)allHotKeys
+{
+       return [mHotKeys allValues];
+}
+
+#pragma mark -
+
+- (BOOL)_hasCarbonEventSupport
+{
+       return floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_1;
+}
+
+- (ITHotKey*)_hotKeyForCarbonHotKey: (EventHotKeyRef)carbonHotKey
+{
+       NSValue* key = [NSValue valueWithPointer: carbonHotKey];
+       return [mHotKeys objectForKey: key];
+}
+
+- (EventHotKeyRef)_carbonHotKeyForHotKey: (ITHotKey*)hotKey
+{
+       NSArray* values;
+       NSValue* value;
+       
+       values = [mHotKeys allKeysForObject: hotKey];
+       NSAssert( [values count] == 1, @"Failed to find Carbon Hotkey for ITHotKey" );
+       
+       value = [values lastObject];
+       
+       return (EventHotKeyRef)[value pointerValue];
+}
+
+- (void)_updateEventHandler
+{
+       if( [self _hasCarbonEventSupport] == NO ) //Don't use event handler on these systems
+               return;
+
+       if( [mHotKeys count] && mEventHandlerInstalled == NO )
+       {
+               EventTypeSpec eventSpec[2] = {
+                       { kEventClassKeyboard, kEventHotKeyPressed },
+                       { kEventClassKeyboard, kEventHotKeyReleased }
+               };    
+
+               InstallEventHandler( GetEventDispatcherTarget(),
+                                                        (EventHandlerProcPtr)hotKeyEventHandler, 
+                                                        2, eventSpec, nil, nil);
+       
+               mEventHandlerInstalled = YES;
+       }
+}
+
+- (void)_hotKeyDown: (ITHotKey*)hotKey
+{
+       [hotKey invoke];
+}
+
+- (void)_hotKeyUp: (ITHotKey*)hotKey
+{
+}
+
+- (void)sendEvent: (NSEvent*)event
+{
+       long subType;
+       EventHotKeyRef carbonHotKey;
+       
+       //We only have to intercept sendEvent to do hot keys on old system versions
+       if( [self _hasCarbonEventSupport] )
+               return;
+       
+       if( [event type] == NSSystemDefined )
+       {
+               subType = [event subtype];
+               
+               if( subType == 6 ) //6 is hot key down
+               {
+                       carbonHotKey= (EventHotKeyRef)[event data1]; //data1 is our hot key ref
+                       if( carbonHotKey != nil )
+                       {
+                               ITHotKey* hotKey = [self _hotKeyForCarbonHotKey: carbonHotKey];
+                               [self _hotKeyDown: hotKey];
+                       }
+               }
+               else if( subType == 9 ) //9 is hot key up
+               {
+                       carbonHotKey= (EventHotKeyRef)[event data1];
+                       if( carbonHotKey != nil )
+                       {
+                               ITHotKey* hotKey = [self _hotKeyForCarbonHotKey: carbonHotKey];
+                               [self _hotKeyUp: hotKey];
+                       }
+               }
+       }
+}
+
+- (OSStatus)sendCarbonEvent: (EventRef)event
+{
+       OSStatus err;
+       EventHotKeyID hotKeyID;
+       ITHotKey* hotKey;
+
+       NSAssert( [self _hasCarbonEventSupport], @"" );
+       NSAssert( GetEventClass( event ) == kEventClassKeyboard, @"Unknown event class" );
+
+       err = GetEventParameter(        event,
+                                                               kEventParamDirectObject, 
+                                                               typeEventHotKeyID,
+                                                               nil,
+                                                               sizeof(EventHotKeyID),
+                                                               nil,
+                                                               &hotKeyID );
+       if( err )
+               return err;
+       
+
+       NSAssert( hotKeyID.signature == 'PTHk', @"Invalid hot key id" );
+       NSAssert( hotKeyID.id != nil, @"Invalid hot key id" );
+
+       hotKey = (ITHotKey*)hotKeyID.id;
+
+       switch( GetEventKind( event ) )
+       {
+               case kEventHotKeyPressed:
+                       [self _hotKeyDown: hotKey];
+               break;
+
+               case kEventHotKeyReleased:
+                       [self _hotKeyUp: hotKey];
+               break;
+
+               default:
+                       NSAssert( 0, @"Unknown event kind" );
+               break;
+       }
+       
+       return noErr;
+}
+
+static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void* refCon )
+{
+       return [[ITHotKeyCenter sharedCenter] sendCarbonEvent: inEvent];
+}
+
+@end
diff --git a/ITKeyBroadcaster.h b/ITKeyBroadcaster.h
new file mode 100755 (executable)
index 0000000..9e30ed4
--- /dev/null
@@ -0,0 +1,19 @@
+//
+//  ITKeyBroadcaster.h
+//
+//  Created by Quentin Carnicelli on Sun Aug 03 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+
+@interface ITKeyBroadcaster : NSButton
+{
+}
+
++ (long)cocoaModifiersAsCarbonModifiers: (long)cocoaModifiers;
+
+@end
+
+__private_extern__ NSString* ITKeyBroadcasterKeyEvent; //keys: keyCombo as ITKeyCombo
\ No newline at end of file
diff --git a/ITKeyBroadcaster.m b/ITKeyBroadcaster.m
new file mode 100755 (executable)
index 0000000..b09ea9a
--- /dev/null
@@ -0,0 +1,73 @@
+//
+//  ITKeyBroadcaster.m
+//
+//  Created by Quentin Carnicelli on Sun Aug 03 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import "ITKeyBroadcaster.h"
+#import "ITKeyCombo.h"
+#import <Carbon/Carbon.h>
+
+NSString* ITKeyBroadcasterKeyEvent = @"ITKeyBroadcasterKeyEvent";
+
+@implementation ITKeyBroadcaster
+
+- (void)_bcastKeyCode: (short)keyCode modifiers: (long)modifiers
+{
+       ITKeyCombo* keyCombo = [ITKeyCombo keyComboWithKeyCode: keyCode modifiers: modifiers];
+       NSDictionary* userInfo = [NSDictionary dictionaryWithObject: keyCombo forKey:@"keyCombo"];
+
+       [[NSNotificationCenter defaultCenter]
+               postNotificationName: ITKeyBroadcasterKeyEvent
+               object: self
+               userInfo: userInfo];
+}
+
+- (void)_bcastEvent: (NSEvent*)event
+{
+       short keyCode;
+       long modifiers;
+       
+       keyCode = [event keyCode];
+       modifiers = [event modifierFlags];
+       modifiers = [[self class] cocoaModifiersAsCarbonModifiers: modifiers];
+
+       [self _bcastKeyCode: keyCode modifiers: modifiers];
+}
+
+- (void)keyDown: (NSEvent*)event
+{
+       [self _bcastEvent: event];
+}
+
+- (BOOL)performKeyEquivalent: (NSEvent*)event
+{
+       [self _bcastEvent: event];
+       return YES;
+}
+
++ (long)cocoaModifiersAsCarbonModifiers: (long)cocoaModifiers
+{
+       static long cocoaToCarbon[6][2] =
+       {
+               { NSCommandKeyMask, cmdKey},
+               { NSAlternateKeyMask, optionKey},
+               { NSControlKeyMask, controlKey},
+               { NSShiftKeyMask, shiftKey},
+                { NSFunctionKeyMask, rightControlKey},
+               //{ NSAlphaShiftKeyMask, alphaLock }, //Ignore this?
+       };
+
+       long carbonModifiers = 0;
+       int i;
+       
+       for( i = 0 ; i < 6; i++ )
+               if( cocoaModifiers & cocoaToCarbon[i][0] )
+                       carbonModifiers += cocoaToCarbon[i][1];
+       
+       return carbonModifiers;
+}
+
+
+@end
diff --git a/ITKeyCombo.h b/ITKeyCombo.h
new file mode 100755 (executable)
index 0000000..e6d1be0
--- /dev/null
@@ -0,0 +1,38 @@
+//
+//  ITKeyCombo.h
+//
+//  Created by Quentin Carnicelli on Sat Aug 02 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+@interface ITKeyCombo : NSObject <NSCopying>
+{
+       int     mKeyCode;
+       int     mModifiers;
+}
+
++ (id)clearKeyCombo;
++ (id)keyComboWithKeyCode: (int)keyCode modifiers: (int)modifiers;
+- (id)initWithKeyCode: (int)keyCode modifiers: (int)modifiers;
+
+- (id)initWithPlistRepresentation: (id)plist;
+- (id)plistRepresentation;
+
+- (BOOL)isEqual: (ITKeyCombo*)combo;
+
+- (int)keyCode;
+- (int)modifiers;
+
+- (BOOL)isClearCombo;
+- (BOOL)isValidHotKeyCombo;
+
+@end
+
+@interface ITKeyCombo (UserDisplayAdditions)
+
+- (NSString*)description;
+
+@end
\ No newline at end of file
diff --git a/ITKeyCombo.m b/ITKeyCombo.m
new file mode 100755 (executable)
index 0000000..1a70528
--- /dev/null
@@ -0,0 +1,177 @@
+//
+//  ITKeyCombo.m
+//
+//  Created by Quentin Carnicelli on Sat Aug 02 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import "ITKeyCombo.h"
+
+#import <Carbon/Carbon.h>
+
+@implementation ITKeyCombo
+
++ (id)clearKeyCombo
+{
+       return [self keyComboWithKeyCode: -1 modifiers: -1];
+}
+
++ (id)keyComboWithKeyCode: (int)keyCode modifiers: (int)modifiers
+{
+       return [[[self alloc] initWithKeyCode: keyCode modifiers: modifiers] autorelease];
+}
+
+- (id)initWithKeyCode: (int)keyCode modifiers: (int)modifiers
+{
+       self = [super init];
+       
+       if( self )
+       {
+               mKeyCode = keyCode;
+               mModifiers = modifiers;
+       }
+       
+       return self;
+}
+
+- (id)initWithPlistRepresentation: (id)plist
+{
+       int keyCode, modifiers;
+               
+       keyCode = [[plist objectForKey: @"keyCode"] intValue];
+       if( keyCode <= 0 ) keyCode = -1;
+
+       modifiers = [[plist objectForKey: @"modifiers"] intValue];
+       if( modifiers <= 0 ) modifiers = -1;
+
+       return [self initWithKeyCode: keyCode modifiers: modifiers];
+}
+
+- (id)plistRepresentation
+{
+       return [NSDictionary dictionaryWithObjectsAndKeys:
+                               [NSNumber numberWithInt: [self keyCode]], @"keyCode",
+                               [NSNumber numberWithInt: [self modifiers]], @"modifiers",
+                               nil];
+}
+
+- (id)copyWithZone:(NSZone*)zone;
+{
+       return [self retain];
+}
+
+- (BOOL)isEqual: (ITKeyCombo*)combo
+{
+       return  [self keyCode] == [combo keyCode] &&
+                       [self modifiers] == [combo modifiers];
+}
+
+#pragma mark -
+
+- (int)keyCode
+{
+       return mKeyCode;
+}
+
+- (int)modifiers
+{
+       return mModifiers;
+}
+
+- (BOOL)isValidHotKeyCombo
+{
+       return mKeyCode >= 0 && mModifiers > 0;
+}
+
+- (BOOL)isClearCombo
+{
+       return mKeyCode == -1 && mModifiers == -1;
+}
+
+@end
+
+#pragma mark -
+
+@implementation ITKeyCombo (UserDisplayAdditions)
+
++ (NSDictionary*)_keyCodesDictionary
+{
+       static NSDictionary* keyCodes = nil;
+       
+       if( keyCodes == nil )
+       {
+               NSString* path;
+               NSString* contents;
+               
+               path = [[NSBundle bundleForClass: self] pathForResource: @"ITKeyCodes" ofType: @"plist"];
+               contents = [NSString stringWithContentsOfFile: path];
+               keyCodes = [[contents propertyList] retain];
+       }
+       
+       return keyCodes;
+}
+
++ (NSString*)_stringForModifiers: (long)modifiers
+{
+       static long modToChar[4][2] =
+       {
+               { cmdKey,               0x23180000 },
+               { optionKey,    0x23250000 },
+               { controlKey,   0x005E0000 },
+               { shiftKey,             0x21e70000 }
+       };
+
+       NSString* str = nil;
+       NSString* charStr;
+       long i;
+
+       str = [NSString string];
+
+       for( i = 0; i < 4; i++ )
+       {
+               if( modifiers & modToChar[i][0] )
+               {
+                       charStr = [NSString stringWithCharacters: (const unichar*)&modToChar[i][1] length: 1];
+                       str = [str stringByAppendingString: charStr];
+               }
+       }
+       
+       if( !str )
+               str = @"";
+       
+       return str;
+}
+
++ (NSString*)_stringForKeyCode: (short)keyCode
+{
+       NSDictionary* dict;
+       id key;
+       NSString* str;
+       
+       dict = [self _keyCodesDictionary];
+       key = [NSString stringWithFormat: @"%d", keyCode];
+       str = [dict objectForKey: key];
+       
+       if( !str )
+               str = [NSString stringWithFormat: @"%X", keyCode];
+       
+       return str;
+}
+
+- (NSString*)description
+{
+       NSString* desc;
+       
+       if( [self isValidHotKeyCombo] ) //This might have to change
+       {
+               desc = [NSString stringWithFormat: @"%@%@",
+                               [[self class] _stringForModifiers: [self modifiers]],
+                               [[self class] _stringForKeyCode: [self keyCode]]];
+       }
+       else
+               desc = NSLocalizedString( @"(None)", @"Hot Keys: Key Combo text for 'empty' combo" );
+
+       return desc;
+}
+
+@end
\ No newline at end of file
diff --git a/ITKeyComboPanel.h b/ITKeyComboPanel.h
new file mode 100755 (executable)
index 0000000..fbe18aa
--- /dev/null
@@ -0,0 +1,40 @@
+//
+//  ITKeyComboPanel.h
+
+//
+//  Created by Quentin Carnicelli on Sun Aug 03 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+@class ITKeyBroadcaster;
+@class ITKeyCombo;
+@class ITHotKey;
+
+@interface ITKeyComboPanel : NSWindowController
+{
+       IBOutlet NSTextField*           mTitleField;
+       IBOutlet NSTextField*           mComboField;
+       IBOutlet ITKeyBroadcaster*      mKeyBcaster;
+
+       NSString*                               mTitleFormat;
+       NSString*                               mKeyName;
+       ITKeyCombo*                             mKeyCombo;
+}
+
++ (id)sharedPanel;
+
+- (int)runModal;
+- (void)runModalForHotKey: (ITHotKey*)hotKey;
+
+- (void)setKeyCombo: (ITKeyCombo*)combo;
+- (ITKeyCombo*)keyCombo;
+
+- (void)setKeyBindingName: (NSString*)name;
+- (NSString*)keyBindingName;
+
+- (IBAction)ok: (id)sender;
+- (IBAction)cancel: (id)sender;
+- (IBAction)clear: (id)sender;
+@end
diff --git a/ITKeyComboPanel.m b/ITKeyComboPanel.m
new file mode 100755 (executable)
index 0000000..e10ffc0
--- /dev/null
@@ -0,0 +1,157 @@
+//
+//  ITKeyComboPanel.m
+//
+//  Created by Quentin Carnicelli on Sun Aug 03 2003.
+//  Copyright (c) 2003 iThink Software. All rights reserved.
+//
+
+#import "ITKeyComboPanel.h"
+
+#import "ITHotKey.h"
+#import "ITKeyCombo.h"
+#import "ITKeyBroadcaster.h"
+#import "ITHotKeyCenter.h"
+
+#if __PROTEIN__
+#import "NSObjectAdditions.h"
+#endif
+
+@implementation ITKeyComboPanel
+
+static id _sharedKeyComboPanel = nil;
+
++ (id)sharedPanel
+{
+       if( _sharedKeyComboPanel == nil )
+       {
+               _sharedKeyComboPanel = [[self alloc] init];
+       
+               #if __PROTEIN__
+                       [_sharedKeyComboPanel releaseOnTerminate];
+               #endif
+       }
+
+       return _sharedKeyComboPanel;
+}
+
+- (id)init
+{
+       return [self initWithWindowNibName: @"ITKeyComboPanel"];
+}
+
+- (void)dealloc
+{
+       [[NSNotificationCenter defaultCenter] removeObserver: self];
+       [mKeyName release];
+       [mTitleFormat release];
+
+       [super dealloc];
+}
+
+- (void)windowDidLoad
+{
+       mTitleFormat = [[mTitleField stringValue] retain];
+
+       [[NSNotificationCenter defaultCenter]
+               addObserver: self
+               selector: @selector( noteKeyBroadcast: )
+               name: ITKeyBroadcasterKeyEvent
+               object: mKeyBcaster];
+}
+
+- (void)_refreshContents
+{
+       if( mComboField )
+               [mComboField setStringValue: [mKeyCombo description]];
+
+       if( mTitleField )
+               [mTitleField setStringValue: [NSString stringWithFormat: mTitleFormat, mKeyName]];
+}
+
+- (int)runModal
+{
+       int resultCode;
+
+       [self window]; //Force us to load
+
+       [self _refreshContents];
+       [[self window] center];
+       [self showWindow: self];
+       resultCode = [[NSApplication sharedApplication] runModalForWindow: [self window]];
+       [self close];
+
+       return resultCode;
+}
+
+- (void)runModalForHotKey: (ITHotKey*)hotKey
+{
+       int resultCode;
+
+       [self setKeyBindingName: [hotKey name]];
+       [self setKeyCombo: [hotKey keyCombo]];
+
+       resultCode = [self runModal];
+       
+       if( resultCode == NSOKButton )
+       {
+               [hotKey setKeyCombo: [self keyCombo]];
+               [[ITHotKeyCenter sharedCenter] registerHotKey: hotKey];
+       }
+}
+
+#pragma mark -
+
+- (void)setKeyCombo: (ITKeyCombo*)combo
+{
+       [combo retain];
+       [mKeyCombo release];
+       mKeyCombo = combo;
+       [self _refreshContents];
+}
+
+- (ITKeyCombo*)keyCombo
+{
+       return mKeyCombo;
+}
+
+- (void)setKeyBindingName: (NSString*)name
+{
+       [name retain];
+       [mKeyName release];
+       mKeyName = name;
+       [self _refreshContents];
+}
+
+- (NSString*)keyBindingName
+{
+       return mKeyName;
+}
+
+#pragma mark -
+
+- (IBAction)ok: (id)sender
+{
+       [[NSApplication sharedApplication] stopModalWithCode: NSOKButton];
+}
+
+- (IBAction)cancel: (id)sender
+{
+       [[NSApplication sharedApplication] stopModalWithCode: NSCancelButton];
+}
+
+- (IBAction)clear: (id)sender
+{
+       [self setKeyCombo: [ITKeyCombo clearKeyCombo]];
+       [[NSApplication sharedApplication] stopModalWithCode: NSOKButton];
+}
+
+- (void)noteKeyBroadcast: (NSNotification*)note
+{
+       ITKeyCombo* keyCombo;
+       
+       keyCombo = [[note userInfo] objectForKey: @"keyCombo"];
+
+       [self setKeyCombo: keyCombo];
+}
+
+@end
diff --git a/ITKit.h b/ITKit.h
index 5b8f165..8279c53 100755 (executable)
--- a/ITKit.h
+++ b/ITKit.h
 
 #import <Cocoa/Cocoa.h>
 
+#import <ITKit/ITHotKey.h>
+#import <ITKit/ITHotKeyCenter.h>
+#import <ITKit/ITKeyBroadcaster.h>
+#import <ITKit/ITKeyCombo.h>
+#import <ITKit/ITKeyComboPanel.h>
 #import <ITKit/ITStatusItem.h>
 #import <ITKit/ITTableView.h>
 #import <ITKit/ITTabView.h>
diff --git a/Japanese.lproj/ITKeyCodes.plist b/Japanese.lproj/ITKeyCodes.plist
new file mode 100755 (executable)
index 0000000..40d44b6
--- /dev/null
@@ -0,0 +1,103 @@
+{\r
+       0 = "A";\r
+       1 = "S";\r
+       2 = "D";\r
+       3 = "F";\r
+       4 = "H";\r
+       5 = "G";\r
+       6 = "Z";\r
+       7 = "X";\r
+       8 = "C";\r
+       9 = "V";\r
+       10 = "$";\r
+       11 = "B";\r
+       12 = "Q";\r
+       13 = "W";\r
+       14 = "E";\r
+       15 = "R";\r
+       16 = "Y";\r
+       17 = "T";\r
+       18 = "1";\r
+       19 = "2";\r
+       20 = "3";\r
+       21 = "4";\r
+       22 = "6";\r
+       23 = "5";\r
+       24 = "=";\r
+       25 = "9";\r
+       26 = "7";\r
+       27 = "-";\r
+       28 = "8";\r
+       29 = "0";\r
+       30 = "\]";\r
+       31 = "O";\r
+       32 = "U";\r
+       33 = "\[";\r
+       34 = "I";\r
+       35 = "P";\r
+       36 = "Return";\r
+       37 = "L";\r
+       38 = "J";\r
+       39 = "\'";\r
+       40 = "K";\r
+       41 = ";";\r
+       42 = "\\";\r
+       43 = ",";\r
+       44 = "\/";\r
+       45 = "N";\r
+       46 = "M";\r
+       47 = ".";\r
+       48 = "Tab";\r
+       49 = "Space";\r
+       50 = "\`";\r
+       51 = "Delete";\r
+       53 = "ESC";\r
+       55 = "Command";\r
+       56 = "Shift";\r
+       57 = "Caps Lock";\r
+       58 = "Option";\r
+       59 = "Control";\r
+       65 = "Pad .";\r
+       67 = "Pad *";\r
+       69 = "Pad +";\r
+       71 = "Clear";\r
+       75 = "Pad /";\r
+       76 = "Pad Enter";\r
+       78 = "Pad -";\r
+       81 = "Pad =";\r
+       82 = "Pad 0";\r
+       83 = "Pad 1";\r
+       84 = "Pad 2";\r
+       85 = "Pad 3";\r
+       86 = "Pad 4";\r
+       87 = "Pad 5";\r
+       88 = "Pad 6";\r
+       89 = "Pad 7";\r
+       91 = "Pad 8";\r
+       92 = "Pad 9";\r
+       96 = "F5";\r
+       97 = "F6";\r
+       98 = "F7";\r
+       99 = "F3";\r
+       100 = "F8";\r
+       101 = "F9";\r
+       103 = "F11";\r
+       105 = "F13";\r
+       107 = "F14";\r
+       109 = "F10";\r
+       111 = "F12";\r
+       113 = "F15";\r
+       114 = "Ins";\r
+       115 = "Home";\r
+       116 = "Page Up";\r
+       117 = "Del";\r
+       118 = "F4";\r
+       119 = "End";\r
+       120 = "F2";\r
+       121 = "Page Down";\r
+       122 = "F1";\r
+       123 = "Left Arrow";\r
+       124 = "Right Arrow";\r
+       125 = "Down Arrow";\r
+       126 = "Up Arrow";\r
+}
\ No newline at end of file
diff --git a/Japanese.lproj/ITKeyComboPanel.nib/classes.nib b/Japanese.lproj/ITKeyComboPanel.nib/classes.nib
new file mode 100755 (executable)
index 0000000..0ab0cc6
--- /dev/null
@@ -0,0 +1,18 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = ITKeyBroadcaster; LANGUAGE = ObjC; SUPERCLASS = NSButton; }, 
+        {
+            ACTIONS = {cancel = id; clear = id; ok = id; }; 
+            CLASS = ITKeyComboPanel; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {
+                mComboField = NSTextField; 
+                mKeyBcaster = ITKeyBroadcaster; 
+                mTitleField = NSTextField; 
+            }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/Japanese.lproj/ITKeyComboPanel.nib/info.nib b/Japanese.lproj/ITKeyComboPanel.nib/info.nib
new file mode 100755 (executable)
index 0000000..d6ed0ab
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>109 47 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>291.0</string>
+       <key>IBGroupedObjects</key>
+       <dict>
+               <key>10</key>
+               <array>
+                       <string>22</string>
+                       <string>27</string>
+               </array>
+       </dict>
+       <key>IBLastGroupID</key>
+       <string>11</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>19</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>6L60</string>
+</dict>
+</plist>
diff --git a/Japanese.lproj/ITKeyComboPanel.nib/objects.nib b/Japanese.lproj/ITKeyComboPanel.nib/objects.nib
new file mode 100755 (executable)
index 0000000..570f426
Binary files /dev/null and b/Japanese.lproj/ITKeyComboPanel.nib/objects.nib differ
diff --git a/Japanese.lproj/Localizable.strings b/Japanese.lproj/Localizable.strings
new file mode 100755 (executable)
index 0000000..96d8bbd
Binary files /dev/null and b/Japanese.lproj/Localizable.strings differ
index e5fc941..b71aeb8 100755 (executable)
Binary files a/Showcase/English.lproj/InfoPlist.strings and b/Showcase/English.lproj/InfoPlist.strings differ
index 20ec715..97f31ac 100755 (executable)
@@ -3,7 +3,7 @@
 //  ITKitTester
 //
 //  Created by Matt L. Judy on Sat Dec 07 2002.
-//  Copyright (c) 2002 NibFile.com. All rights reserved.
+//  Copyright (c) 2002 iThink Software. All rights reserved.
 //
 
 #import <Cocoa/Cocoa.h>