Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDHotKeyEvent fixes #1147

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ Quicksilver*.dmg
Quicksilver/SharedSupport/Changes*.html
Quicksilver/Code-External/VDKQueue
Quicksilver/Code-External/DisableSubviews
.idea/
.idea/
Quicksilver/Code-External/NDHotKeyEvent
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "Quicksilver/Code-External/LaunchAtLoginController"]
path = Quicksilver/Code-External/LaunchAtLoginController
url = https://github.com/quicksilver/LaunchAtLoginController.git
[submodule "Quicksilver/Code-External/NDHotKeyEvent"]
path = Quicksilver/Code-External/NDHotKeyEvent
url = git://github.com/quicksilver/ndhotkeyevent.git
14 changes: 9 additions & 5 deletions Quicksilver/Code-App/QSController.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define DEVEXPIRE 180.0f
#define DEPEXPIRE 365.24219878f

@interface QSObject (QSURLHandling)
@interface QSObject (QSURLHandling) <NDHotKeyEventTarget>
- (void)handleURL:(NSURL *)url;
@end

Expand Down Expand Up @@ -61,7 +61,7 @@ + (void)initialize {

[NSApp registerServicesMenuSendTypes:[NSArray arrayWithObjects:NSStringPboardType, NSRTFPboardType, nil] returnTypes:[NSArray arrayWithObjects:NSStringPboardType, NSRTFPboardType, nil]];

[NDHotKeyEvent setSignature:'DAED'];
[QSHotKeyEvent setSignature:'DAED'];

[QSVoyeur sharedInstance];

Expand Down Expand Up @@ -1005,12 +1005,16 @@ - (void)startQuicksilver:(id)sender {
[self startDropletConnection];
}

- (void)hotKeyReleased:(NDHotKeyEvent *)hotKey {
[self activateInterface:nil];
}

- (id)activationHotKey { return nil; }
- (void)setActivationHotKey:(id)object {
[[QSHotKeyEvent hotKeyWithIdentifier:kActivationHotKey] setEnabled:NO];

QSHotKeyEvent *activationKey = (QSHotKeyEvent *)[QSHotKeyEvent hotKeyWithDictionary:object];
[activationKey setTarget:self selectorReleased:(SEL) 0 selectorPressed:@selector(activateInterface:)];
QSHotKeyEvent *activationKey = [QSHotKeyEvent hotKeyWithDictionary:object];
[activationKey setTarget:self];
[activationKey setIdentifier:kActivationHotKey];
[activationKey setEnabled:YES];
}
Expand Down Expand Up @@ -1054,7 +1058,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSInteger modifiers = [oldModifiers unsignedIntegerValue];
if (modifiers < (1 << (rightControlKeyBit+1) )) {
NSLog(@"updating shortcut %ld", (long)modifiers);
[defaults setValue:[NSNumber numberWithInteger:carbonModifierFlagsToCocoaModifierFlags(modifiers)] forKey:kHotKeyModifiers];
[defaults setValue:[NSNumber numberWithInteger:NDCocoaModifierFlagsForCarbonModifierFlags(modifiers)] forKey:kHotKeyModifiers];
[defaults synchronize];
}

Expand Down
2 changes: 1 addition & 1 deletion Quicksilver/Code-App/QSTriggersPrefPane.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ - (void)populateTypeMenu {
[addMenu addItem:groupItem];
}

for (id menuItem in [addMenu itemArray]) {
for (NSMenuItem *menuItem in [addMenu itemArray]) {
[menuItem setTarget:self];
[menuItem setAction:@selector(addTrigger:)];
}
Expand Down
467 changes: 0 additions & 467 deletions Quicksilver/Code-External/NDClasses/NDHotKeyEvent.h

This file was deleted.

Loading