mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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:
6
emcc.c
6
emcc.c
@ -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
|
||||
|
Reference in New Issue
Block a user