diff options
Diffstat (limited to 'src/demos/es1/RedSquare.java')
-rwxr-xr-x | src/demos/es1/RedSquare.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java index cce9b31..9160ad4 100755 --- a/src/demos/es1/RedSquare.java +++ b/src/demos/es1/RedSquare.java @@ -62,8 +62,9 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo } public void keyReleased(KeyEvent e) { System.out.println("KEY-RELEASED "+Thread.currentThread()+" UNHANDLED "+e); - } - public void keyTyped(KeyEvent e) { + if( !e.isPrintableKey() || e.isAutoRepeat() ) { + return; + } if(e.getKeyChar()=='f') { System.out.println("KEY-TYPED "+Thread.currentThread()+" FULLSCREEN "+e); window.setFullscreen(!window.isFullscreen()); |