Hotkeys do not show in the hotkey chooser if they don't have a modifier key.
authorKent Sutherland <ksuther@ithinksw.com>
Sun, 15 Dec 2002 14:46:55 +0000 (14:46 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Sun, 15 Dec 2002 14:46:55 +0000 (14:46 +0000)
English.lproj/Preferences.nib/info.nib
English.lproj/Preferences.nib/objects.nib
KeyBroadcaster.m
PreferencesController.m

index 3f55daf..28f5f51 100755 (executable)
@@ -19,6 +19,7 @@
        <key>IBOpenObjects</key>
        <array>
                <integer>6</integer>
+               <integer>115</integer>
        </array>
        <key>IBSystem Version</key>
        <string>6F21</string>
index 837bf6e..0d547ec 100755 (executable)
Binary files a/English.lproj/Preferences.nib/objects.nib and b/English.lproj/Preferences.nib/objects.nib differ
index 7b47d83..724c7a2 100755 (executable)
@@ -16,7 +16,9 @@
     modifiers = [event modifierFlags];
     
     modifiers = [KeyBroadcaster cocoaToCarbonModifiers:modifiers];
-    [self _broadcastKeyCode:keyCode andModifiers:modifiers];
+    if (modifiers > 0) {
+        [self _broadcastKeyCode:keyCode andModifiers:modifiers];
+    }
 }
 
 - (BOOL)performKeyEquivalent:(NSEvent *)event
index b4cba9e..3a9ecd3 100755 (executable)
 
 - (IBAction)okHotKey:(id)sender
 {
-    NSString *string;
-    if (([combo modifiers] <= 0) && ([combo keyCode] >= 0)) {
-        [window setLevel:NSNormalWindowLevel];
-        NSRunAlertPanel(@"Bad Key Combo", @"Please enter a valid key combo. A valid combo must have a modifier key in it. (Command, option, shift, control).", @"OK", nil, nil, nil);
-        [window setLevel:NSStatusWindowLevel];
-        return;
-    }
-    
-    string = [combo userDisplayRep];
+    NSString *string = [combo userDisplayRep];
     
     if (string == nil) {
         string = @"None";