Skip to content

Instantly share code, notes, and snippets.

@gengwg
Created April 23, 2025 17:43
Show Gist options
  • Save gengwg/ae924707164f6b8caf1f4dd7d6687e92 to your computer and use it in GitHub Desktop.
Save gengwg/ae924707164f6b8caf1f4dd7d6687e92 to your computer and use it in GitHub Desktop.
Change the Shortcut for "Run Python File in Terminal" in VSCode
  1. Open VS Code Keyboard Shortcuts

    • Press Ctrl + K then Ctrl + S (Windows/Linux)
    • OR Cmd + K then Cmd + S (Mac)
      (This opens the keyboard shortcuts editor.)
  2. Search for the Python Run Command

    • Type in the search bar:
      Python: Run Python File in Terminal
      

    (This is the command that executes when you click the ▶️ button.)

  3. Assign a New Shortcut

    • Click the pencil icon (or press Enter on the existing keybinding).
    • Press your desired new shortcut (e.g., Super + R, Shift + F10, etc.).
    • Hit Enter to save.

    (Avoid conflicts with existing shortcuts!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment