Skip to content

Commit

Permalink
NEWTKBD: handle JogAmp 2.0.2 NEWT API changes.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
xranby committed Apr 11, 2013
1 parent 311f951 commit 67500d2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/jake2/sys/NEWTKBD.java
Expand Up @@ -73,7 +73,7 @@ private void HandleEvents()
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);
Expand Down Expand Up @@ -183,9 +183,8 @@ private static int XLateKeyCode(KeyEvent ev) {
// 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;

Expand Down

0 comments on commit 67500d2

Please sign in to comment.