mirror of
https://github.com/qinyuhang/ShadowsocksX-NG-R.git
synced 2026-10-25 17:53:49 +00:00
33 lines
834 B
Objective-C
33 lines
834 B
Objective-C
//
|
|
// ShortcutsController.m
|
|
// ShadowsocksX-NG
|
|
//
|
|
// Created by 邱宇舟 on 2017/3/10.
|
|
// Copyright © 2017年 qiuyuzhou. All rights reserved.
|
|
//
|
|
|
|
#import "ShortcutsController.h"
|
|
|
|
#import <MASShortcut/Shortcut.h>
|
|
|
|
#import "ShortcutsPreferencesWindowController.h"
|
|
|
|
|
|
@implementation ShortcutsController
|
|
|
|
+ (void)bindShortcuts {
|
|
MASShortcutBinder* binder = [MASShortcutBinder sharedBinder];
|
|
[binder
|
|
bindShortcutWithDefaultsKey:kGlobalShortcutToggleRunning
|
|
toAction:^{
|
|
[[NSNotificationCenter defaultCenter] postNotificationName: @"NOTIFY_TOGGLE_RUNNING" object: nil];
|
|
}];
|
|
[binder
|
|
bindShortcutWithDefaultsKey:kGlobalShortcutSwitchProxyMode
|
|
toAction:^{
|
|
[[NSNotificationCenter defaultCenter] postNotificationName: @"NOTIFY_SWITCH_PROXY_MODE" object: nil];
|
|
}];
|
|
}
|
|
|
|
@end
|