mirror of
https://github.com/yanue/V2rayU.git
synced 2025-06-27 05:30:09 +00:00
31 lines
761 B
Objective-C
31 lines
761 B
Objective-C
//
|
|
// ShortcutsController.m
|
|
// ShadowsocksX-NG
|
|
//
|
|
// Created by 邱宇舟 on 2017/3/10.
|
|
// Copyright © 2017年 qiuyuzhou. All rights reserved.
|
|
//
|
|
|
|
#import "Shortcut.h"
|
|
|
|
#import <MASShortcut/Shortcut.h>
|
|
|
|
|
|
@implementation ShortcutsController
|
|
|
|
+ (void)bindShortcuts {
|
|
MASShortcutBinder* binder = [MASShortcutBinder sharedBinder];
|
|
[binder
|
|
bindShortcutWithDefaultsKey: @"ToggleRunning"
|
|
toAction:^{
|
|
[[NSNotificationCenter defaultCenter] postNotificationName: @"NOTIFY_TOGGLE_RUNNING_SHORTCUT" object: nil];
|
|
}];
|
|
[binder
|
|
bindShortcutWithDefaultsKey: @"SwitchProxyMode"
|
|
toAction:^{
|
|
[[NSNotificationCenter defaultCenter] postNotificationName: @"NOTIFY_SWITCH_PROXY_MODE_SHORTCUT" object: nil];
|
|
}];
|
|
}
|
|
|
|
@end
|