diff options
author | 2017-10-27 15:48:44 +0200 | |
---|---|---|
committer | 2017-10-27 15:48:44 +0200 | |
commit | a831c9a57b0d8f1edf4eebc90b24ae794c755b5c (patch) | |
tree | f97a9c504fa9082e4e61af6184c459915b80b7f3 /src/lib | |
parent | feat(Menu): Add menu item to toggle (service) dev tools (diff) | |
download | ferdium-app-a831c9a57b0d8f1edf4eebc90b24ae794c755b5c.tar.gz ferdium-app-a831c9a57b0d8f1edf4eebc90b24ae794c755b5c.tar.zst ferdium-app-a831c9a57b0d8f1edf4eebc90b24ae794c755b5c.zip |
fix(Shortcuts): Use `Alt+[0-9]` for tab switching on Linux`
Fixes #148
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Menu.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 37f3dd45d..3f2c9741b 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -1,7 +1,7 @@ | |||
1 | import { remote, shell } from 'electron'; | 1 | import { remote, shell } from 'electron'; |
2 | import { autorun, computed, observable, toJS } from 'mobx'; | 2 | import { autorun, computed, observable, toJS } from 'mobx'; |
3 | 3 | ||
4 | import { isMac } from '../environment'; | 4 | import { isMac, isLinux } from '../environment'; |
5 | 5 | ||
6 | const { app, Menu } = remote; | 6 | const { app, Menu } = remote; |
7 | 7 | ||
@@ -242,9 +242,10 @@ export default class FranzMenu { | |||
242 | const services = this.stores.services.enabled; | 242 | const services = this.stores.services.enabled; |
243 | 243 | ||
244 | if (this.stores.user.isLoggedIn) { | 244 | if (this.stores.user.isLoggedIn) { |
245 | const systemAcceleratorKey = isLinux ? 'Alt' : 'CmdOrCtrl'; | ||
245 | return services.map((service, i) => ({ | 246 | return services.map((service, i) => ({ |
246 | label: service.name, | 247 | label: service.name, |
247 | accelerator: i <= 9 ? `CmdOrCtrl+${i + 1}` : null, | 248 | accelerator: i <= 9 ? `${systemAcceleratorKey}+${i + 1}` : null, |
248 | type: 'radio', | 249 | type: 'radio', |
249 | checked: service.isActive, | 250 | checked: service.isActive, |
250 | click: () => { | 251 | click: () => { |