From 8b34a0389e07967ce0c2ccc430a7c1d0803c3e51 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 22 Mar 2013 06:33:01 +0100 Subject: NEWT/Android: Remove KeyEvent.KEYCODE_HOME handling, since it doesn't work - i.e. cannot be intercepted this way. --- .../jogamp/newt/driver/android/WindowDriver.java | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'src/newt') diff --git a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java index 0a253ff9e..8002c49b3 100644 --- a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java @@ -47,7 +47,6 @@ import com.jogamp.common.os.AndroidVersion; import com.jogamp.nativewindow.egl.EGLGraphicsDevice; import com.jogamp.newt.Screen; import com.jogamp.newt.ScreenMode; -import com.jogamp.newt.event.NEWTEvent; import jogamp.opengl.egl.EGL; import jogamp.opengl.egl.EGLGraphicsConfiguration; @@ -622,17 +621,6 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 { } return false; // continue w/ further processing } - protected boolean handleKeyCodeHome(KeyEvent.DispatcherState state, android.view.KeyEvent event) { - if (event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) { - Log.d(MD.TAG, "handleKeyCodeHome.0 : "+event); - state.startTracking(event, this); - } else if (event.getAction() == KeyEvent.ACTION_UP && !event.isCanceled() && state.isTracking(event)) { - Log.d(MD.TAG, "handleKeyCodeHome.1 : "+event); - enqueueAKey2NKeyUpDown(event, com.jogamp.newt.event.KeyEvent.VK_HOME); - return true; // we handle further processing - } - return false; // continue w/ further processing - } private void enqueueAKey2NKeyUpDown(android.view.KeyEvent aEvent, short newtKeyCode) { final com.jogamp.newt.event.KeyEvent eDown = AndroidNewtEventFactory.createKeyEvent(aEvent, newtKeyCode, com.jogamp.newt.event.KeyEvent.EVENT_KEY_PRESSED, this); final com.jogamp.newt.event.KeyEvent eUp = AndroidNewtEventFactory.createKeyEvent(aEvent, newtKeyCode, com.jogamp.newt.event.KeyEvent.EVENT_KEY_RELEASED, this); @@ -640,8 +628,6 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 { enqueueEvent(false, eUp); } - // private GLEventListenerState glels = null; - @Override protected void consumeKeyEvent(com.jogamp.newt.event.KeyEvent e) { super.consumeKeyEvent(e); // consume event, i.e. call all KeyListener @@ -689,11 +675,6 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 { if (state != null) { return handleKeyCodeBack(state, event); } - } else if ( event.getKeyCode() == KeyEvent.KEYCODE_HOME ) { - final KeyEvent.DispatcherState state = getKeyDispatcherState(); - if (state != null) { - return handleKeyCodeHome(state, event); - } } return false; // cont. processing } -- cgit v1.2.3