mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 15:41: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:
@ -126,7 +126,12 @@ public class PuzzleApplet extends JApplet implements Runtime.CallJavaCB {
|
||||
}
|
||||
}
|
||||
public void keyTyped(KeyEvent e) {
|
||||
runtimeCall("jcallback_key_event", new int[] {0, 0, e.getKeyChar()});
|
||||
int key = e.getKeyChar();
|
||||
if (key == 26 && e.isShiftDown() && e.isControlDown()) {
|
||||
runtimeCall("jcallback_redo_event", new int[0]);
|
||||
return;
|
||||
}
|
||||
runtimeCall("jcallback_key_event", new int[] {0, 0, key});
|
||||
}
|
||||
});
|
||||
pp.addMouseListener(new MouseAdapter() {
|
||||
|
Reference in New Issue
Block a user