From e8f45dad086d78c9961f72d9e9530b57a0afb3e8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 26 Oct 2011 21:00:23 +0200 Subject: NEWT/OSX: Add missing sendKeyEvent(..) specialization to produce the keyCode (like enqueueKeyEvent()) --- src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 @@ -278,9 +278,18 @@ public class MacWindow extends WindowImpl { warpPointer0(getWindowHandle(), x, y); } + @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 -- cgit v1.2.3