aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/environment.js11
-rw-r--r--src/lib/Menu.js6
-rw-r--r--src/stores/AppStore.js4
3 files changed, 15 insertions, 6 deletions
diff --git a/src/environment.js b/src/environment.js
index e185120c0..7bb2db134 100644
--- a/src/environment.js
+++ b/src/environment.js
@@ -8,7 +8,16 @@ export const isMac = process.platform === 'darwin';
8export const isWindows = process.platform === 'win32'; 8export const isWindows = process.platform === 'win32';
9export const isLinux = process.platform === 'linux'; 9export const isLinux = process.platform === 'linux';
10 10
11export const ctrlKey = isMac ? '⌘' : 'Ctrl'; 11let ctrlShortcutKey;
12if (isMac) {
13 ctrlShortcutKey = '⌘';
14} else if (isWindows) {
15 ctrlShortcutKey = 'Ctrl';
16} else {
17 ctrlShortcutKey = 'Alt';
18}
19
20export const ctrlKey = ctrlShortcutKey;
12 21
13let api; 22let api;
14if (!isDevMode || (isDevMode && useLiveAPI)) { 23if (!isDevMode || (isDevMode && useLiveAPI)) {
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index c29cd00ae..6bbf302ca 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -1,7 +1,7 @@
1import { remote, shell } from 'electron'; 1import { remote, shell } from 'electron';
2import { autorun, computed, observable, toJS } from 'mobx'; 2import { autorun, computed, observable, toJS } from 'mobx';
3 3
4import { isMac } from '../environment'; 4import { isMac, isLinux } from '../environment';
5 5
6const { app, Menu, dialog } = remote; 6const { app, Menu, dialog } = remote;
7 7
@@ -133,7 +133,6 @@ export default class FranzMenu {
133 }, 133 },
134 }); 134 });
135 135
136
137 tpl[1].submenu.unshift({ 136 tpl[1].submenu.unshift({
138 label: 'Reload Service', 137 label: 'Reload Service',
139 id: 'reloadService', 138 id: 'reloadService',
@@ -277,9 +276,10 @@ export default class FranzMenu {
277 const services = this.stores.services.enabled; 276 const services = this.stores.services.enabled;
278 277
279 if (this.stores.user.isLoggedIn) { 278 if (this.stores.user.isLoggedIn) {
279 const systemAcceleratorKey = isLinux ? 'Alt' : 'CmdOrCtrl';
280 return services.map((service, i) => ({ 280 return services.map((service, i) => ({
281 label: service.name, 281 label: service.name,
282 accelerator: i <= 9 ? `CmdOrCtrl+${i + 1}` : null, 282 accelerator: i <= 9 ? `${systemAcceleratorKey}+${i + 1}` : null,
283 type: 'radio', 283 type: 'radio',
284 checked: service.isActive, 284 checked: service.isActive,
285 click: () => { 285 click: () => {
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 4cfe6d0b5..f608a689e 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -114,13 +114,13 @@ export default class AppStore extends Store {
114 114
115 // Set active the next service 115 // Set active the next service
116 key( 116 key(
117 '⌘+pagedown, ctrl+pagedown, ⌘+shift+tab, ctrl+shift+tab', () => { 117 '⌘+pagedown, ctrl+pagedown, ⌘+tab, ctrl+tab', () => {
118 this.actions.service.setActiveNext(); 118 this.actions.service.setActiveNext();
119 }); 119 });
120 120
121 // Set active the prev service 121 // Set active the prev service
122 key( 122 key(
123 '⌘+pageup, ctrl+pageup, ⌘+tab, ctrl+tab', () => { 123 '⌘+pageup, ctrl+pageup, ⌘+shift+tab, ctrl+shift+tab', () => {
124 this.actions.service.setActivePrev(); 124 this.actions.service.setActivePrev();
125 }); 125 });
126 126