diff options
author | 2021-08-10 19:22:48 +0530 | |
---|---|---|
committer | 2021-08-10 19:56:53 +0530 | |
commit | 9ba6631b9353e408d7cefe85372666f6011d4928 (patch) | |
tree | 6a0fa5c77ee863e40c0c6477990d266fd976069e /src/environment.js | |
parent | build: add Ferdi snap package (#1767) (diff) | |
download | ferdium-app-9ba6631b9353e408d7cefe85372666f6011d4928.tar.gz ferdium-app-9ba6631b9353e408d7cefe85372666f6011d4928.tar.zst ferdium-app-9ba6631b9353e408d7cefe85372666f6011d4928.zip |
refactor: Move platform-specific logic for shortcut keys into common location.
Diffstat (limited to 'src/environment.js')
-rw-r--r-- | src/environment.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/environment.js b/src/environment.js index 923754048..39b854db4 100644 --- a/src/environment.js +++ b/src/environment.js | |||
@@ -82,7 +82,13 @@ export const altKey = isMac ? '⌥' : 'Alt'; | |||
82 | export const shiftKey = isMac ? '⇧' : 'Shift'; | 82 | export const shiftKey = isMac ? '⇧' : 'Shift'; |
83 | 83 | ||
84 | // Platform specific shortcut keys | 84 | // Platform specific shortcut keys |
85 | export const settingsShortcutKey = (isAccelerator = true) => `${isAccelerator ? cmdKey : ctrlKey}+${isMac ? ',' : 'P'}`; | 85 | const shortcutKey = (isAccelerator) => `${isAccelerator ? cmdKey : ctrlKey}`; |
86 | export const lockFerdiShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+${shiftKey}+L`; | ||
87 | export const todosToggleShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+T`; | ||
88 | export const workspaceToggleShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+D`; | ||
89 | export const muteFerdiShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+${shiftKey}+M`; | ||
90 | export const addNewServiceShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+N`; | ||
91 | export const settingsShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+${isMac ? ',' : 'P'}`; | ||
86 | 92 | ||
87 | let api; | 93 | let api; |
88 | let wsApi; | 94 | let wsApi; |