From 85338858f5c58694fa88e77df1386d0556887944 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 19 Feb 2013 08:00:38 +0100 Subject: Bug 678 (fix), Bug 641 (API + Windows Impl.), Bug 688 (prep): Update NEWT's KeyEvent handling while distinguish keyCode (kbd layout independent) and keySym (kbd layout dependent) API Changes: - Virtual key codes and symbols are of type short. - KeyEvent.keySymbol() shall return a layout dependent value (Bug 641) - Method returns former keyCode() value, which was layout dependent. - Returns 'short' value - KeyEvent.keyCode() returns a short value, instead of int - KeyEvent.keyCode() shall return a layout independent value (Bug 641) - To ease implementation, we only 'require' the scan code to be mapped to a 'US Keyboard layout', which allows reusing layout dependent code while preserving the goal to have a fixed physical key association - Implementation status: - Windows OK - X11 TODO - OSX: 50/50 TODO - Using layout independent 'action keys' - Using layout dependent 'printable keys' - returning above semantics for both, keyCode and keySym - Android 50/50 TODO - Returning the layout independent keyCode - Mapping probably incomplete - KeyEvent.EVENT_KEY_TYPED and KeyListener.keyTyped(KeyEvent) (Bug 688) - Marked DEPRECATED - No more called for auto-repeat events - Synthesized in WindowImpl.consumeKeyEvent(..): No more injection by native- or java driver code - NEWTEvent.eventType: int -> short - field, as well as all method involving eventType changed to short. - NEWTEvent.isSystemEvent: REMOVED - Never used as well as never being implemented properly Internal Changes: - Simplified keyEvent driver code - Especially the Windows native driver's mapping code could be simplified using scanCode and MapVirtualKeyEx - NEWT Event Factories: hashMap -> switch/case Unit Tests: - - Added NewtCanvasAWT Offscreen Layer Tests important to test the AWT -> NEWT translation on OSX/CALayer: - TestNewtKeyCodeModifiersAWT - TestNewtKeyCodesAWT - TestNewtKeyEventAutoRepeatAWT - TestNewtKeyEventOrderAWT - TestNewtKeyPressReleaseUnmaskRepeatAWT --- make/scripts/tests-x64.bat | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'make/scripts/tests-x64.bat') diff --git a/make/scripts/tests-x64.bat b/make/scripts/tests-x64.bat index b4b05d58b..df855bf56 100755 --- a/make/scripts/tests-x64.bat +++ b/make/scripts/tests-x64.bat @@ -65,14 +65,16 @@ REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestParenting01 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestListenerCom01AWT REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyEventOrderAWT %* +REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyCodeModifiersAWT %* REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyEventAutoRepeatAWT %* REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyPressReleaseUnmaskRepeatAWT %* -scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyCodesAWT %* -REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyCodeModifiersAWT %* +REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyCodesAWT %* + +REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT %* REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNEWTWindowAWT $* REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersAWTCanvas %* REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNewtCanvasAWT %* -REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNewtCanvasSWT %* +scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNewtCanvasSWT %* REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT %* REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT %* REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01bAWT %* -- cgit v1.2.3