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

6
emcc.c
View File

@ -310,6 +310,8 @@ void key(int keycode, int charcode, const char *key, const char *chr,
keyevent = MOD_NUM_KEYPAD | '7';
} else if (!strnullcmp(key, "PageUp") || keycode==33) {
keyevent = MOD_NUM_KEYPAD | '9';
} else if (shift && ctrl && (keycode & 0x1F) == 26) {
keyevent = UI_REDO;
} else if (chr && chr[0] && !chr[1]) {
keyevent = chr[0] & 0xFF;
} else if (keycode >= 96 && keycode < 106) {
@ -323,10 +325,10 @@ void key(int keycode, int charcode, const char *key, const char *chr,
}
if (keyevent >= 0) {
if (shift && keyevent >= 0x100)
if (shift && (keyevent >= 0x100 && !IS_UI_FAKE_KEY(keyevent)))
keyevent |= MOD_SHFT;
if (ctrl) {
if (ctrl && !IS_UI_FAKE_KEY(keyevent)) {
if (keyevent >= 0x100)
keyevent |= MOD_CTRL;
else