mirror of
https://github.com/qinyuhang/ShadowsocksX-NG-R.git
synced 2026-10-05 18:33:53 +00:00
Start integrate SSR 1. modify profile, added SSR configure and init this profile to empty to compatible with origin SS 2. replace ss-local from v2.4.6 to 2.4.8 (from @breakwa11 ) 3. add obfs params box to configure view 4. add scan from “ssr://” QR code Todo: make modify to program interaction with ss-local to accept SSR
49 lines
1.8 KiB
Objective-C
49 lines
1.8 KiB
Objective-C
//
|
|
// Created by clowwindy on 3/1/14.
|
|
// Copyright (c) 2014 clowwindy. All rights reserved.
|
|
//
|
|
|
|
#import "SWBApplication.h"
|
|
|
|
|
|
@implementation SWBApplication {
|
|
|
|
}
|
|
|
|
// Enable Key Shortcuts
|
|
// http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-without-an-edit-menu
|
|
- (void) sendEvent:(NSEvent *)event {
|
|
if ([event type] == NSKeyDown) {
|
|
if (([event modifierFlags] & NSDeviceIndependentModifierFlagsMask) == NSCommandKeyMask) {
|
|
if ([[event charactersIgnoringModifiers] isEqualToString:@"x"]) {
|
|
if ([self sendAction:@selector(cut:) to:nil from:self])
|
|
return;
|
|
}
|
|
else if ([[event charactersIgnoringModifiers] isEqualToString:@"c"]) {
|
|
if ([self sendAction:@selector(copy:) to:nil from:self])
|
|
return;
|
|
}
|
|
else if ([[event charactersIgnoringModifiers] isEqualToString:@"v"]) {
|
|
if ([self sendAction:@selector(paste:) to:nil from:self])
|
|
return;
|
|
}
|
|
else if ([[event charactersIgnoringModifiers] isEqualToString:@"z"]) {
|
|
if ([self sendAction:@selector(undo) to:nil from:self])
|
|
return;
|
|
}
|
|
else if ([[event charactersIgnoringModifiers] isEqualToString:@"a"]) {
|
|
if ([self sendAction:@selector(selectAll:) to:nil from:self])
|
|
return;
|
|
}
|
|
}
|
|
else if (([event modifierFlags] & NSDeviceIndependentModifierFlagsMask) == (NSCommandKeyMask | NSShiftKeyMask)) {
|
|
if ([[event charactersIgnoringModifiers] isEqualToString:@"Z"]) {
|
|
if ([self sendAction:@selector(redo) to:nil from:self])
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
[super sendEvent:event];
|
|
}
|
|
|
|
@end |