Change the modified-Home/End escape sequence from H/F to 1/4

For unmodified Home/End, winpty instead sends WM_KEYDOWN / WM_KEYUP
messages to the console window so that the console can decide what escape
to use based on the VT terminal "alternate mode".

Fixes https://github.com/rprichard/winpty/issues/114
This commit is contained in:
Ryan Prichard 2017-04-27 21:17:03 -07:00
parent 5814705546
commit 6765a41c5b
2 changed files with 6 additions and 2 deletions

View File

@ -7,6 +7,10 @@ Input handling changes:
[#99](https://github.com/rprichard/winpty/issues/99)
* AltGr keys are handled better now.
[#109](https://github.com/rprichard/winpty/issues/109)
* In `ENABLE_VIRTUAL_TERMINAL_INPUT` mode, when typing Home/End with a
modifier (e.g. Ctrl), winpty now generates an H/F escape sequence like
`^[[1;5F` rather than a 1/4 escape like `^[[4;5~`.
[#114](https://github.com/rprichard/winpty/issues/114)
Resizing and scraping fixes:

View File

@ -60,10 +60,10 @@ void reencodeEscapedKeyPress(
case VK_F10: escapeCode = { EscapedKey::Numeric, {'2', '1'} }; break;
case VK_F11: escapeCode = { EscapedKey::Numeric, {'2', '3'} }; break;
case VK_F12: escapeCode = { EscapedKey::Numeric, {'2', '4'} }; break;
case VK_HOME: escapeCode = { EscapedKey::Numeric, {'1'} }; break;
case VK_HOME: escapeCode = { EscapedKey::Letter, {'H'} }; break;
case VK_INSERT: escapeCode = { EscapedKey::Numeric, {'2'} }; break;
case VK_DELETE: escapeCode = { EscapedKey::Numeric, {'3'} }; break;
case VK_END: escapeCode = { EscapedKey::Numeric, {'4'} }; break;
case VK_END: escapeCode = { EscapedKey::Letter, {'F'} }; break;
case VK_PRIOR: escapeCode = { EscapedKey::Numeric, {'5'} }; break;
case VK_NEXT: escapeCode = { EscapedKey::Numeric, {'6'} }; break;
}