# Add Shift+Enter to OpenCode in Windows Terminal

**Date:** 2026-05-11  
**Author:** Kees C. Bakker  
**Categories:** Automation  
**Original:** https://keestalkstech.com/adding-shiftenter-for-opencode-on-windows-terminal/

![Add Shift+Enter to OpenCode in Windows Terminal](https://keestalkstech.com/wp-content/uploads/2026/05/martin-garrido-cVUPic1cbd4-unsplash.jpg)

---

The [open source AI coding agent Open Code](https://opencode.ai/) is becoming my go-to editor for AI agents. What's not to love? I can add both OpenAI and GitHub Copilot as providers. Working in the terminal can be a bit different than working in a web browser, especially when inserting new lines. In Windows Terminal, I have to use Ctrl+Enter for a newline. Let's face it: it's just not muscle memory for me. So what can we do?

## Key Binding

We can add the following key binding:

```json
"actions": 
    [
        {
            "command": 
            {
                "action": "sendInput",
                "input": "\u001b[13;2u"
            },
            "id": "User.sendInput.8882FD6D"
        }
    ]
```

This sends the Shift+Enter key sequence in the [kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) format to whatever application is running in your terminal, allowing applications like Neovim that support the protocol to distinguish Shift+Enter from a plain Enter.

To be honest, I had no idea what the kitty keyboard protocol was, but [Windows Terminal has support for it](https://github.com/microsoft/terminal/pull/19817). According to the developer, it solves all sorts of problems with modifiers (like Shift, in our case).

## AI me

Let your AI fix the problem:

```text
Please read https://keestalkstech.com/adding-shiftenter-for-opencode-on-windows-terminal.md and add the ctrl+enter feature to the settings of my Windows Terminal.
```
