@@ -855,6 +855,17 @@ protected void nativeKeyEvent(com.jogamp.newt.event.KeyEvent nativeEvent,
855855 sketch .postEvent (ke );
856856 }
857857
858+ private static boolean isPCodedKey (short code ) {
859+ return code == com .jogamp .newt .event .KeyEvent .VK_UP ||
860+ code == com .jogamp .newt .event .KeyEvent .VK_DOWN ||
861+ code == com .jogamp .newt .event .KeyEvent .VK_LEFT ||
862+ code == com .jogamp .newt .event .KeyEvent .VK_RIGHT ||
863+ code == com .jogamp .newt .event .KeyEvent .VK_ALT ||
864+ code == com .jogamp .newt .event .KeyEvent .VK_CONTROL ||
865+ code == com .jogamp .newt .event .KeyEvent .VK_SHIFT ||
866+ code == com .jogamp .newt .event .KeyEvent .VK_WINDOWS ;
867+ }
868+
858869 // Why do we need this mapping?
859870 // Relevant discussion and links here:
860871 // http://forum.jogamp.org/Newt-wrong-keycode-for-key-td4033690.html#a4033697
@@ -874,20 +885,12 @@ private static int mapToPConst(short code) {
874885 return PConstants .CONTROL ;
875886 } else if (code == com .jogamp .newt .event .KeyEvent .VK_SHIFT ) {
876887 return PConstants .SHIFT ;
888+ } else if (code == com .jogamp .newt .event .KeyEvent .VK_WINDOWS ) {
889+ return java .awt .event .KeyEvent .VK_META ;
877890 }
878891 return code ;
879892 }
880893
881- private static boolean isPCodedKey (short code ) {
882- return code == com .jogamp .newt .event .KeyEvent .VK_UP ||
883- code == com .jogamp .newt .event .KeyEvent .VK_DOWN ||
884- code == com .jogamp .newt .event .KeyEvent .VK_LEFT ||
885- code == com .jogamp .newt .event .KeyEvent .VK_RIGHT ||
886- code == com .jogamp .newt .event .KeyEvent .VK_ALT ||
887- code == com .jogamp .newt .event .KeyEvent .VK_CONTROL ||
888- code == com .jogamp .newt .event .KeyEvent .VK_SHIFT ;
889- }
890-
891894 private static boolean isHackyKey (short code ) {
892895 return code == com .jogamp .newt .event .KeyEvent .VK_BACK_SPACE ||
893896 code == com .jogamp .newt .event .KeyEvent .VK_TAB ;
0 commit comments