From 8b9eb4687d94426615e9de28b91af6a20a01f5b8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 17 Jun 2013 09:41:45 +0200 Subject: Adapt to JOGL commit 8b33170ec6fd3f215976875cb66d746fa1b48f61, Fix Bug 688: Removal of NEWT KeyEvent.EVENT_KEY_TYPED and KeyListener.keyTyped(KeyEvent) --- src/demos/es1/RedSquare.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/demos/es1') 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()); -- cgit v1.2.3