@@ -772,6 +772,62 @@ window.writeSettingsFile = () => {
772
772
document . getElementById ( "settingsEditorStatus" ) . innerText = "New values written to settings.json file at " + new Date ( ) . toTimeString ( ) ;
773
773
} ;
774
774
775
+ // Display available keyboard shortcuts
776
+ window . openShortcutsHelp = ( ) => {
777
+ new Modal ( {
778
+ type : "custom" ,
779
+ title : `Available Keyboard Shortcuts <i>(v${ electron . remote . app . getVersion ( ) } )</i>` ,
780
+ html : `<h5>Using either the on-screen or a physical keyboard, you can use the following shortcuts:</h5>
781
+ <table id="shortcutsHelp" style="width: 100%;">
782
+ <tr>
783
+ <th>Trigger</th>
784
+ <th>Action</th>
785
+ </tr>
786
+ <tr>
787
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl + Shift" } + C</td>
788
+ <td>Copy selected buffer from the terminal.</td>
789
+ </tr>
790
+ <tr>
791
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl + Shift" } + V</td>
792
+ <td>Paste system clipboard to the terminal.</td>
793
+ </tr>
794
+ <tr>
795
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl" } + Tab</td>
796
+ <td>Switch to the next opened terminal tab (left to right order).</td>
797
+ </tr>
798
+ <tr>
799
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl" } + Shift + Tab</td>
800
+ <td>Switch to the previous opened terminal tab (right to left order).</td>
801
+ </tr>
802
+ <tr>
803
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl" } + [1-5]</td>
804
+ <td>Switch to a specific terminal tab, or create it if it hasn't been opened yet.</td>
805
+ </tr>
806
+ <tr>
807
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl" } + Shift + S</td>
808
+ <td>Open the settings editor.</td>
809
+ </tr>
810
+ <tr>
811
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl" } + Shift + K</td>
812
+ <td>List available keyboard shortcuts.</td>
813
+ </tr>
814
+ <tr>
815
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl" } + Shift + H</td>
816
+ <td>Toggle hidden files and directories in the file browser.</td>
817
+ </tr>
818
+ <tr>
819
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl" } + Shift + P</td>
820
+ <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>
821
+ </tr>
822
+ <tr>
823
+ <td>${ process . platform === "darwin" ? "Command" : "Ctrl" } + Shift + I</td>
824
+ <td>Open Chromium Dev Tools (for debugging purposes).</td>
825
+ </tr>
826
+ </table>
827
+ <br>`
828
+ } ) ;
829
+ } ;
830
+
775
831
// Global keyboard shortcuts
776
832
const globalShortcut = electron . remote . globalShortcut ;
777
833
globalShortcut . unregisterAll ( ) ;
@@ -789,6 +845,13 @@ function registerKeyboardShortcuts() {
789
845
}
790
846
} ) ;
791
847
848
+ // Open list of keyboard shortcuts
849
+ globalShortcut . register ( "CommandOrControl+Shift+K" , ( ) => {
850
+ if ( ! document . getElementById ( "shortcutsHelp" ) ) {
851
+ window . openShortcutsHelp ( ) ;
852
+ }
853
+ } ) ;
854
+
792
855
// Copy and paste shortcuts
793
856
794
857
if ( process . platform === "darwin" ) {
0 commit comments