microsoft / microsoft/terminal
Cmd.exe traps short cut keys with dwMode=ENABLE_VIRTUAL_TERMINAL_INPUT for input
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
1.15.2875.0
### Windows build number
10.0.22000.1219
### Other Software
_No response_
### Steps to reproduce
Set ConsoleMode on input handle to ENABLE_VIRTUAL_TERMINAL_INPUT and try to ReadConsoleInput on CTRL-C or CTRL-V. The console doesn't react as a VT100 terminal.
### Expected Behavior
I set the terminal input mode to dwMode=ENABLE_VIRTUAL_TERMINAL_INPUT.
I expect that with ReadConsoleInput transforms all keyboard input to VT100 terminal output. For example CTRL-C should return ETC and CTRL-V should return SYN. However the console (cmd.exe) overrides these actions. The same for a lot of other keyboard shortcuts. This is not standard VT100 behavior and should not occur.
How can this non VT100 behavior be disabled ?
### Actual Behavior
Termina in VT100 input mode behaves like Windows short cut keys, for example CTRL-C and CTRL-V are copy/paste.
Contributor guide
Research direction
No source files or tests are named. Start by reproducing the behavior with ENABLE_VIRTUAL_TERMINAL_INPUT and ReadConsoleInput in cmd.exe, focusing on CTRL-C and CTRL-V handling. Done means identifying whether shortcut interception can be disabled or confirming the platform limitation and documenting the result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, shell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100