summaryrefslogtreecommitdiffstats
path: root/src/demos/es2/RedSquare.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-06-17 09:41:45 +0200
committerSven Gothel <[email protected]>2013-06-17 09:41:45 +0200
commit8b9eb4687d94426615e9de28b91af6a20a01f5b8 (patch)
tree51fa8bd99aaa2eb9b392beb88dc8b52d2049b673 /src/demos/es2/RedSquare.java
parentaffa7c075773cbafdd815c81422bb280bccf6aac (diff)
Adapt to JOGL commit 8b33170ec6fd3f215976875cb66d746fa1b48f61, Fix Bug 688: Removal of NEWT KeyEvent.EVENT_KEY_TYPED and KeyListener.keyTyped(KeyEvent)
Diffstat (limited to 'src/demos/es2/RedSquare.java')
-rwxr-xr-xsrc/demos/es2/RedSquare.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java
index 1269342..21e78cf 100755
--- a/src/demos/es2/RedSquare.java
+++ b/src/demos/es2/RedSquare.java
@@ -49,8 +49,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());