Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Terminal InputNew to Visual Studio Code? Get it now.
Terminal Input

Terminal Input

SeeminglyScience

|
3,707 installs
| (2) | Free
Assign custom input sequences that can be sent to the active terminal.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Terminal Input

A very simple VSCode extension for setting key bindings that send custom input to the active terminal.

Motivation

The main shell I use is PowerShell. The default key binding in PowerShell to add a new line to the prompt without completing the command is shift + enter. In VSCode, this doesn't work and the shift modifier is lost.

So the entire point of this extension is so that I can rebind shift + enter to some other input that the integrated terminal can accept, and then handle it within PSReadLine.

Fixing shift+enter for PowerShell

  1. Add this to your settings.json file.

    "terminal.integrated.commandsToSkipShell": [ "terminalInput.sendCustomInput" ],
    "terminalInput.customInputs": { "heartEmojiWithAlt": "\u001b\u2665" },
    
  2. Add this to your keybindings.json file.

    {
        "key": "shift+enter",
        "command": "terminalInput.sendCustomInput",
        "args": [ "heartEmojiWithAlt" ],
        "when": "terminalFocus"
    }
    
  3. Add this to your $profile.CurrentUserAllHosts file.

    if ($env:TERM_PROGRAM -eq 'vscode') {
        Set-PSReadLineKeyHandler -Chord "alt+$([char]0x2665)" -Function AddLine
    }
    
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft