kingToolbox / kingToolbox/WindTerm
Alt key not working despite terminal.altModifierKey = 1 setting in WindTerm 2.7.0
- Dominant language
- C
- Stars
- 32.3k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- **WindTerm Version**: 2.7.0
- **OS**: Windows 10/11
- **Keyboard Layout**: Standard
## Problem Description
The Alt key modifier is not being sent correctly to terminal applications, even when `terminal.altModifierKey` is set to `1` (ESC-prefixed character) in both session configuration and GUI properties.
### Expected Behavior
When pressing `Alt+T` in a terminal session with `terminal.altModifierKey = 1`:
- Running `cat -v` should display `^[t` (ESC + t)
- Applications like Claude Code should receive the Alt key sequence correctly
### Actual Behavior
- Running `cat -v` and pressing `Alt+T` only displays `t` (without ESC prefix)
- All Alt key combinations (Alt+T, Alt+M, Ctrl+Alt+C, Ctrl+Alt+V, etc.) do not work as expected
- The Alt modifier is completely ignored
## Steps to Reproduce
1. Create a new Shell session (PowerShell or CMD)
2. In session properties → Advanced, set "Alt Modifier Key" to "ESC-prefixed character" (value = 1)
3. Or add `"terminal.altModifierKey": 1` in `user.sessions`
4. Open the session
5. Run `cat -v`
6. Press `Alt+T`
7. Observe that only `t` is displayed instead of `^[t`
## Configuration
In `user.sessions`:
```json
{
"session.label" : "Test-Session",
"session.protocol" : "Shell",
"session.system" : "powershell",
"session.target" : "C:/WINDOWS/system32/WindowsPowerShell/v1.0/powershell.exe",
"terminal.altModifierKey" : 1,
"terminal.metaModifierKey" : 1
}
```
## Additional Context
- The GUI correctly shows the setting as "ESC-prefixed character"
- This issue affects ALL Alt key combinations, not just specific ones
- The same Alt key combinations work correctly in Windows Terminal and WSL
- Restarting WindTerm and creating new sessions does not resolve the issue
- This may be related to other Alt key issues reported in 2.7.0 (AltGr issues, Alt+; issues)
## Workaround
Currently using Windows Terminal as a temporary workaround for applications that require Alt key sequences.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue in a PowerShell or CMD session using the documented terminal.altModifierKey setting and cat -v, then trace the terminal's Alt-key input handling. Verify completion when Alt+T produces an ESC-prefixed t and the reported Alt combinations are delivered correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, powershell
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100