X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=windows.c;fp=windows.c;h=ffd0f75894611260a7abdcf86e8c670334cb73a0;hb=d72db91888c1efddd56c67eee665b0a83c9329eb;hp=076e713d7ad5590f954c187413a094855fb6af81;hpb=e4d05c36d996c3053a66ca29cfe84e9652d501e3;p=sgt-puzzles.git diff --git a/windows.c b/windows.c index 076e713..ffd0f75 100644 --- a/windows.c +++ b/windows.c @@ -3405,8 +3405,18 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, } break; case WM_CHAR: - if (!midend_process_key(fe->me, 0, 0, (unsigned char)wParam)) - PostQuitMessage(0); + { + int key = (unsigned char)wParam; + if (key == '\x1A') { + BYTE keystate[256]; + if (GetKeyboardState(keystate) && + (keystate[VK_SHIFT] & 0x80) && + (keystate[VK_CONTROL] & 0x80)) + key = UI_REDO; + } + if (!midend_process_key(fe->me, 0, 0, key)) + PostQuitMessage(0); + } return 0; case WM_TIMER: if (fe->timer) {