Jogamp
NEWTKBD: handle JogAmp 2.0.2 NEWT API changes.
authorXerxes Rånby <xerxes@zafena.se>
Thu, 11 Apr 2013 13:06:31 +0000 (15:06 +0200)
committerXerxes Rånby <xerxes@zafena.se>
Thu, 11 Apr 2013 13:06:31 +0000 (15:06 +0200)
Use MouseEvent getRotation
JogAmp jogl: ded080fd890c21b54ba1f96d84f9e355711dc88a

Use UTF-16 UniCode VK key names
JogAmp jogl: b13868b612689307ebf4e46ee4ede2fd0560e504

Singed-off-by: Xerxes Rånby <xerxes@zafena.se>

src/jake2/sys/NEWTKBD.java

index abf0988..594fee3 100644 (file)
@@ -73,7 +73,7 @@ final public class NEWTKBD extends KBD
                                        break;
                                        
                                case Jake2InputEvent.WheelMoved:
-                                       int dir = ((MouseEvent)event.ev).getWheelRotation();
+                                       float dir = ((MouseEvent)event.ev).getRotation()[0];
                                        if (dir > 0) {
                                                Do_Key_Event(Key.K_MWHEELDOWN, true);
                                                Do_Key_Event(Key.K_MWHEELDOWN, false);
@@ -183,9 +183,8 @@ final public class NEWTKBD extends KBD
 //     00701
                        case KeyEvent.VK_INSERT: key = Key.K_INS; break;
                        // toggle console for DE and US keyboards
-                       case KeyEvent.VK_DEAD_ACUTE:
+                       case KeyEvent.VK_QUOTE:
                        case KeyEvent.VK_CIRCUMFLEX:
-                       case KeyEvent.VK_DEAD_CIRCUMFLEX:
                        case KeyEvent.VK_BACK_QUOTE: key='`'; break;
                        case KeyEvent.VK_SPACE: key = Key.K_SPACE; break;
                        
http://JogAmp.org git info: FAQ, tutorial and man pages.