Windows Shortcuts

Nov 7, 2023

Please refer to this post if you are a Mac user.

In this post, I will be sharing why and how I ditched the mouse and started utilising keyboard shortcuts.

Why avoid the mouse?

As a software engineer, efficiency is of the essence, especially when one is dealing with many tasks in his bucket or meeting tight deadlines. For any typing setup, majority of the time is spent moving between the keyboard and mouse. Fortunately for us, we can save this precious time by mastering keyboard shortcuts that can perform the same functions/tasks. Not only do you become more productive, you also get to look really cool (somewhat) and experience what it is like to feel like an experienced hacker (sortof).

It will require some practice to master and apply them properly. But rest assured, once you overcome this steep learning curve, you will witness your productivity drastically increase overtime. Below is a compilation of shortcuts that I have learnt and frequently use on Web browsers, Terminals and VSCode.

Glossary of Shortcuts

Basic

 Alt + F4                             Close active window                                                 
 Alt + Tab                            Toggle applications/View all applications from desktop              
 Alt + Shift                          Change Language/Keyboard                                            
 Alt + Shift + Up/Down                Move current line above/below it                                    
 Ctrl + A                             Select all                                                          
 Ctrl + C                             Copy                                                                
 Ctrl + F                             Find keyword                                                        
 Ctrl + H                             Replace keyword                                                     
 Ctrl + S                             Save                                                                
 Ctrl + V                             Paste                                                               
 Ctrl + X                             Cut                                                                 
 Ctrl + Z                             Undo                                                                
 Ctrl + Shift + Z                     Redo                                                                
 F11                                  Fullscreen                                                          
 Ctrl + Left/Right                    Move cursor to the start/end of words                               
 Ctrl + Home/End                      Move cursor to start/end of document                                
 Home/End                             Move cursor to start/end of line                                    
 Shift + Up/Down                      Select characters above/below the line                              
 Shift + Left/Right                   Select characters left/right of the cursor                          
 Shift + Home/End                     Select all characters left/right of the cursor                      
 Shift + Page Up/Page Down            Select all characters from cursor to the top/bottom of the document 
 Windows                              Show Start Menu                                                     
 Windows + `Type your search`         System search                                                       
 Windows + D                          Show/hide desktop                                                   
 Windows + E                          Open File Explorer                                                  
 Windows + Alt + R                    Screen recording                                                    
 Windows + Print Screen               Print full screen                                                   
 Windows + Shift + S OR Print Screen  Select area and print screen of selected area                       

Browser

 Alt + D                            Move cursor to address bar                
 Alt + Left/Right                   Navigate to previous/next page in history 
 Ctrl + D                           Bookmark current tab                      
 Ctrl + R                           Reload page                               
 Ctrl + T                           Open new tab                              
 Alt + F4 OR Ctrl + F4 OR Ctrl + W  Close active tab                          
 Ctrl + Shift + T                   Open recently closed tab                  
 Ctrl + Shift + W                   Close all active windows                  
 Ctrl + Tab                         Toggle between tabs                       
 F12                                Open web console                          

VSCode

 Alt + Left/Right                       Toggle tabs                                                  
 Alt + Shift + Up/Down                  Copy and paste current line above/below it                   
 Ctrl + L                               Select line                                                  
 Ctrl + P                               Search for file                                              
 Ctrl + N                               Work on a new file                                           
 Ctrl + W                               Close active tab                                             
 Ctrl + \                               Split code editor/Command Prompt                             
 Ctrl + /                               Comment line of code                                         
 Ctrl + `                               Open/Close Command Prompt in code editor                     
 Ctrl + Alt + Up/Down                   Add cursors to multiple lines at the same horizontal positon 
 Ctrl + Shift + `                       Open new Command Prompt in code editor                       
 Ctrl + Shift + F                       Find keyword in directory                                    
 Ctrl + Shift + K                       Delete line                                                  
 Ctrl + Shift + P                       Open command palette                                         
 (Ctrl + K) + V                         Preview Markdown file on the side                            
 Ctrl + Shift + Left/Right              Select words to the left/right of the cursor                 
 `Select keyword` + (Ctrl + D)          Add cursor to all found keywords one at a time               
 `Select keyword` + (Ctrl + Shift + L)  Add cursor to all found keywords                             

Powershell/Command Prompt

 Alt + Enter                          Fullscreen                             
 Home                                 Move cursor to start of line           
 End                                  Move cursor to end of line             
 Backspace                            Clear character before cursor position 
 Delete                               Clear character after cursor position  
 Ctrl + Home                          Clear line before cursor position      
 Ctrl + End                           Clear line after cursor position       
 Esc OR `clear` OR `cls`              Clear screen                           
 Ctrl + Backspace                     Delete previous word                   
 Ctrl + C                             Cancel program                         
 Ctrl + Z                             Stop program                           
 Ctrl + Left/Right                    Move cursor between words              
 `history`                            Show history of commands               
 Up/Down                              Cycle history of commands              

Other ways to shortcut your workflow

  1. Learn to touch-type, which incorporates all your fingers to access the keys on your keyboard optimally. With sufficient practice, you will be able to master typing without glancing on the keys, saving time as a result.

  2. Use Tabs for autocompletion in the Terminal, especially when your folder/file names are long/foreign.

  3. When inputing text in multiple input boxes, use Tabs instead of moving the mouse to proceed to the next input.

  4. Use aliases to execute long/complex commands

    • alias nrs=npm run start (Executes npm run start with nrs)

    • alias gps=git push (Executes git push with gps)

  5. Broadcast input to multiple Terminal tabs in the same session if the same executions need to be done on multiple replica servers (You will need to install Windows Terminal for this)

Conclusion

Ever since I started learning and using these shortcuts, it was excruciating to realise the amount of time wasted performing repetitive work (Eg. Editing the same variable names repeatedly; Highlighting a block of text; Deleting characters one by one using Backspace). To anyone who is using a computer, ditch the mouse and give these shortcuts a shot. Afterwards, you can reward yourself with a nice coffee break :)

  1. Keyboard shortcuts for a Developer

  2. 10 Essential Keyboard Shortcuts For Programmers

  3. Powershell Key Combinations

  4. Windows vs. Mac: 70+ Common and Helpful Keyboard Shortcuts

  5. Visual Studio Code - Keyboard Shortcuts for Windows

  6. What is Windows Terminal?

  7. Typing Techniques – 5 Skills to Master