Skip to content

Commit c8f7b03

Browse files
committed
docs: add Windows Terminal Shift+Enter configuration guide
1 parent 11efda3 commit c8f7b03

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

packages/web/astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export default defineConfig({
7171
"models",
7272
"themes",
7373
"keybinds",
74+
"windows-terminal",
7475
"commands",
7576
"formatters",
7677
"permissions",
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Windows Terminal
3+
description: Configure Shift+Enter for extended keyboard support.
4+
---
5+
6+
Windows Terminal doesn't send modifier keys with Enter by default. This guide shows how to configure it to send `Shift+Enter` as an escape sequence for apps using extended keyboard protocols.
7+
8+
---
9+
10+
## Prerequisites
11+
12+
You need Windows Terminal v1.0 or later. The latest version from Microsoft Store is recommended.
13+
14+
---
15+
16+
## Define the action
17+
18+
Open your `settings.json` at:
19+
20+
```
21+
%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
22+
```
23+
24+
Add this to the root-level `actions` array:
25+
26+
```json
27+
"actions": [
28+
{
29+
"command": {
30+
"action": "sendInput",
31+
"input": "\u001b[13;2u"
32+
},
33+
"id": "User.sendInput.ShiftEnterCustom"
34+
}
35+
]
36+
```
37+
38+
Create the array if it doesn't exist. Ensure proper commas between items.
39+
40+
---
41+
42+
## Bind the key
43+
44+
Add this to the root-level `keybindings` array:
45+
46+
```json
47+
"keybindings": [
48+
{
49+
"keys": "shift+enter",
50+
"id": "User.sendInput.ShiftEnterCustom"
51+
}
52+
]
53+
```
54+
55+
Remove any conflicting `shift+enter` entries if present.
56+
57+
---
58+
59+
## Apply changes
60+
61+
Save the file and restart Windows Terminal or open a new tab. Press `Shift+Enter` in OpenCode to insert a newline.
62+
63+
---
64+
65+
## Troubleshooting
66+
67+
If the binding doesn't work:
68+
69+
1. Validate your JSON syntax using a tool like jsonlint.com
70+
2. Check Settings > Actions in the UI for the binding
71+
3. Look for conflicting keybindings
72+
4. Ensure you're using the correct `settings.json` path for your Terminal version (Preview/Canary use different paths)
73+
74+
For more details, see the [Windows Terminal documentation](https://github.com/microsoft/terminal).

0 commit comments

Comments
 (0)