diff options
author | Sven Gothel <[email protected]> | 2011-10-26 21:00:23 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-10-26 21:00:23 +0200 |
commit | e8f45dad086d78c9961f72d9e9530b57a0afb3e8 (patch) | |
tree | 6a110dd726802775544c0c6dec6e4f467f631ebe /src/newt/classes/jogamp | |
parent | 309f03ed08c1661db792f21aab5b48559dc4f215 (diff) |
NEWT/OSX: Add missing sendKeyEvent(..) specialization to produce the keyCode (like enqueueKeyEvent())
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java index 40989f94b..d09ac72ba 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java @@ -279,8 +279,17 @@ public class MacWindow extends WindowImpl { } @Override + public void sendKeyEvent(int eventType, int modifiers, int keyCode, char keyChar) { + final int key = convertKeyChar(keyChar); + if(DEBUG_IMPLEMENTATION) System.err.println("MacWindow.sendKeyEvent "+Thread.currentThread().getName()); + // Note that we send the key char for the key code on this + // platform -- we do not get any useful key codes out of the system + super.sendKeyEvent(eventType, modifiers, key, keyChar); + } + + @Override public void enqueueKeyEvent(boolean wait, int eventType, int modifiers, int keyCode, char keyChar) { - int key = convertKeyChar(keyChar); + final int key = convertKeyChar(keyChar); if(DEBUG_IMPLEMENTATION) System.err.println("MacWindow.enqueueKeyEvent "+Thread.currentThread().getName()); // Note that we send the key char for the key code on this // platform -- we do not get any useful key codes out of the system |