1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-07 06:22:47 -05:00

From RDB: a patch to allow special keys (^C, ^Z, Delete, Return) to

send Telnet special sequences (Interrupt Process, Suspend, Erase
Char, End Of Line) instead of their ASCII equivalents. In particular
Return -> Telnet End Of Line is _always_ enabled irrespective of the
configuration, while the others are optional. Also in this patch, an
entertainingly ghastly use of `switch' to allow literal ^M^J to do
the same thing as magic-^M (the Return key) when in Raw protocol.

[originally from svn r1109]
This commit is contained in:
Simon Tatham
2001-05-09 15:12:26 +00:00
parent c2eb57a034
commit e001f1533e
6 changed files with 120 additions and 23 deletions

View File

@ -2554,7 +2554,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
if (wParam == VK_BACK && shift_state == 0) { /* Backspace */
*p++ = (cfg.bksp_is_delete ? 0x7F : 0x08);
return p - output;
*p++ = 0;
return -2;
}
if (wParam == VK_TAB && shift_state == 1) { /* Shift tab */
*p++ = 0x1B;
@ -2572,7 +2573,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
}
if (wParam == VK_CANCEL && shift_state == 2) { /* Ctrl-Break */
*p++ = 3;
return p - output;
*p++ = 0;
return -2;
}
if (wParam == VK_PAUSE) { /* Break/Pause */
*p++ = 26;
@ -2786,7 +2788,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
*/
if (wParam == VK_RETURN) { /* Return */
*p++ = 0x0D;
return p - output;
*p++ = 0;
return -2;
}
}