Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 77899c1

Browse files
committed
💥 Make most shortcuts on macOS Ctrl instead of Cmd
Fixes unavailable shortcuts and inconsistencies
1 parent 53eb5ed commit 77899c1

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/_renderer.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -792,35 +792,35 @@ window.openShortcutsHelp = () => {
792792
<td>Paste system clipboard to the terminal.</td>
793793
</tr>
794794
<tr>
795-
<td>${process.platform === "darwin" ? "Command" : "Ctrl"} + Tab</td>
795+
<td>Ctrl + Tab</td>
796796
<td>Switch to the next opened terminal tab (left to right order).</td>
797797
</tr>
798798
<tr>
799-
<td>${process.platform === "darwin" ? "Command" : "Ctrl"} + Shift + Tab</td>
799+
<td>Ctrl + Shift + Tab</td>
800800
<td>Switch to the previous opened terminal tab (right to left order).</td>
801801
</tr>
802802
<tr>
803-
<td>${process.platform === "darwin" ? "Command" : "Ctrl"} + [1-5]</td>
803+
<td>Ctrl + [1-5]</td>
804804
<td>Switch to a specific terminal tab, or create it if it hasn't been opened yet.</td>
805805
</tr>
806806
<tr>
807-
<td>${process.platform === "darwin" ? "Command" : "Ctrl"} + Shift + S</td>
807+
<td>Ctrl + Shift + S</td>
808808
<td>Open the settings editor.</td>
809809
</tr>
810810
<tr>
811-
<td>${process.platform === "darwin" ? "Command" : "Ctrl"} + Shift + K</td>
811+
<td>Ctrl + Shift + K</td>
812812
<td>List available keyboard shortcuts.</td>
813813
</tr>
814814
<tr>
815-
<td>${process.platform === "darwin" ? "Command" : "Ctrl"} + Shift + H</td>
815+
<td>Ctrl + Shift + H</td>
816816
<td>Toggle hidden files and directories in the file browser.</td>
817817
</tr>
818818
<tr>
819-
<td>${process.platform === "darwin" ? "Command" : "Ctrl"} + Shift + P</td>
819+
<td>Ctrl + Shift + P</td>
820820
<td>Toggle the on-screen keyboard's "Password Mode", that allows you to safely type<br> sensitive information even if your screen might be recorded (disables visual input feedback).</td>
821821
</tr>
822822
<tr>
823-
<td>${process.platform === "darwin" ? "Command" : "Ctrl"} + Shift + I</td>
823+
<td>Ctrl + Shift + I</td>
824824
<td>Open Chromium Dev Tools (for debugging purposes).</td>
825825
</tr>
826826
</table>
@@ -834,19 +834,19 @@ globalShortcut.unregisterAll();
834834

835835
function registerKeyboardShortcuts() {
836836
// Open inspector
837-
globalShortcut.register("CommandOrControl+Shift+I", () => {
837+
globalShortcut.register("Control+Shift+I", () => {
838838
electron.remote.getCurrentWindow().webContents.toggleDevTools();
839839
});
840840

841841
// Open settings
842-
globalShortcut.register("CommandOrControl+Shift+S", () => {
842+
globalShortcut.register("Control+Shift+S", () => {
843843
if (!document.getElementById("settingsEditor")) {
844844
window.openSettings();
845845
}
846846
});
847847

848848
// Open list of keyboard shortcuts
849-
globalShortcut.register("CommandOrControl+Shift+K", () => {
849+
globalShortcut.register("Control+Shift+K", () => {
850850
if (!document.getElementById("shortcutsHelp")) {
851851
window.openShortcutsHelp();
852852
}
@@ -874,7 +874,7 @@ function registerKeyboardShortcuts() {
874874

875875
// Switch tabs
876876
// Next
877-
globalShortcut.register("CommandOrControl+Tab", () => {
877+
globalShortcut.register("Control+Tab", () => {
878878
if (window.term[window.currentTerm+1]) {
879879
window.focusShellTab(window.currentTerm+1);
880880
} else if (window.term[window.currentTerm+2]) {
@@ -888,7 +888,7 @@ function registerKeyboardShortcuts() {
888888
}
889889
});
890890
// Previous
891-
globalShortcut.register("CommandOrControl+Shift+Tab", () => {
891+
globalShortcut.register("Control+Shift+Tab", () => {
892892
let i = window.currentTerm ? window.currentTerm : 4;
893893
if (window.term[i] && i !== window.currentTerm) {
894894
window.focusShellTab(i);
@@ -903,29 +903,29 @@ function registerKeyboardShortcuts() {
903903
}
904904
});
905905
// By tab number
906-
globalShortcut.register("CommandOrControl+1", () => {
906+
globalShortcut.register("Control+1", () => {
907907
window.focusShellTab(0);
908908
});
909-
globalShortcut.register("CommandOrControl+2", () => {
909+
globalShortcut.register("Control+2", () => {
910910
window.focusShellTab(1);
911911
});
912-
globalShortcut.register("CommandOrControl+3", () => {
912+
globalShortcut.register("Control+3", () => {
913913
window.focusShellTab(2);
914914
});
915-
globalShortcut.register("CommandOrControl+4", () => {
915+
globalShortcut.register("Control+4", () => {
916916
window.focusShellTab(3);
917917
});
918-
globalShortcut.register("CommandOrControl+5", () => {
918+
globalShortcut.register("Control+5", () => {
919919
window.focusShellTab(4);
920920
});
921921

922922
// Toggle hiding dotfiles in fsDisp
923-
globalShortcut.register("CommandOrControl+Shift+H", () => {
923+
globalShortcut.register("Control+Shift+H", () => {
924924
window.fsDisp.toggleHidedotfiles();
925925
});
926926

927927
// Hide on-screen keyboard visual feedback (#394)
928-
globalShortcut.register("CommandOrControl+Shift+P", () => {
928+
globalShortcut.register("Control+Shift+P", () => {
929929
window.keyboard.togglePasswordMode();
930930
});
931931
}

0 commit comments

Comments
 (0)