Area-InputHelp WantedIssue-BugProduct-Terminal
仓库指标
- Star
- (35,764 star)
- PR 合并指标
- (平均合并 27天 19小时) (30 天内合并 24 个 PR)
描述
Windows Terminal version
current main
Windows build number
10.0.19045.4894
Other Software
No response
Steps to reproduce
- Run the following c++ code:
#include <iostream>
#include <windows.h>
int main()
{
INPUT_RECORD rec;
DWORD count;
while (true)
{
::ReadConsoleInputW(::GetStdHandle(STD_INPUT_HANDLE), &rec, 1, &count);
if (rec.EventType == KEY_EVENT)
{
std::cout << "type: KEY_EVENT" << std::hex
<< ", down: " << rec.Event.KeyEvent.bKeyDown
<< ", ENHANCED_KEY: " << !!(rec.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY)
<< ", ctrl: 0x" << rec.Event.KeyEvent.dwControlKeyState
<< ", vcod: 0x" << rec.Event.KeyEvent.wVirtualKeyCode
<< ", scod: 0x" << rec.Event.KeyEvent.wVirtualScanCode
<< ", wchr: 0x" << rec.Event.KeyEvent.uChar.UnicodeChar << '\n';
}
}
}
- Press LeftCtrl key, press RightCtrl key, check ENHANCED_KEY flag.
- Press LeftAlt key, press RightAlt key, check ENHANCED_KEY flag.
Expected Behavior
The ENHANCED_KEY flag is present when RightAlt is pressed and released.
The current conhost.exe is not affected by this issue.
Actual Behavior
The ENHANCED_KEY flag is absent when RightAlt is released, but is present when RightAlt is pressed.