~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From RDB: a patch to allow special keys (^C, ^Z, Delete, Return) to
[sgt/putty]
/
window.c
diff --git
a/window.c
b/window.c
index
e89a309
..
48ba35b
100644
(file)
--- a/
window.c
+++ b/
window.c
@@
-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);
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;
}
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;
}
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;
}
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;
*/
if (wParam == VK_RETURN) { /* Return */
*p++ = 0x0D;
- return p - output;
+ *p++ = 0;
+ return -2;
}
}
}
}