Ctrl and Alt shouldn't reset the scrollback even if reset-on-
[u/mdw/putty] / window.c
index a195cc6..1496650 100644 (file)
--- a/window.c
+++ b/window.c
@@ -2871,7 +2871,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
      * Record that we pressed key so the scroll window can be reset, but
      * be careful to avoid Shift-UP/Down
      */
-    if (wParam != VK_SHIFT && wParam != VK_PRIOR && wParam != VK_NEXT) {
+    if (wParam != VK_SHIFT && wParam != VK_PRIOR && wParam != VK_NEXT &&
+       wParam != VK_MENU && wParam != VK_CONTROL) {
        seen_key_event = 1;
     }
 
@@ -3724,7 +3725,8 @@ void write_clip(wchar_t * data, int len, int must_deselect)
                multilen = WideCharToMultiByte(CP_ACP, 0, unitab+uindex, 1,
                                               NULL, 0, NULL, NULL);
                if (multilen != 1) {
-                   blen = sprintf(before, "{\\u%d", udata[uindex]);
+                   blen = sprintf(before, "{\\uc%d\\u%d", multilen,
+                                  udata[uindex]);
                    alen = 1; strcpy(after, "}");
                } else {
                    blen = sprintf(before, "\\u%d", udata[uindex]);