Map Ctrl-Shift-Z to Redo.

This is in addition to the existing keystrokes r, ^R and ^Y. I've
become used to Ctrl-Shift-Z in other GUI games, and my fingers keep
getting confused when my own puzzles don't handle it the same way.
This commit is contained in:
Simon Tatham
2017-09-20 16:38:31 +01:00
parent e4d05c36d9
commit d72db91888
5 changed files with 28 additions and 5 deletions

View File

@ -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) {