Allow the use of F16-F19, SECTION, INSERT, HOME, END, DELETE, NUMPADENTER, CLEAR, LMETA keys.

This commit is contained in:
Erik Broes 2012-11-27 15:14:58 +01:00
parent ee69763707
commit 9d4f22034c
2 changed files with 18 additions and 2 deletions

View File

@ -158,7 +158,11 @@ public class Keyboard {
public static final int KEY_F13 = 0x64; /* (NEC PC98) */
public static final int KEY_F14 = 0x65; /* (NEC PC98) */
public static final int KEY_F15 = 0x66; /* (NEC PC98) */
public static final int KEY_F16 = 0x67; /* Extended Function keys - (Mac) */
public static final int KEY_F17 = 0x68;
public static final int KEY_F18 = 0x69;
public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */
public static final int KEY_F19 = 0x71; /* Extended Function keys - (Mac) */
public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */
public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */
public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */
@ -173,6 +177,7 @@ public class Keyboard {
public static final int KEY_UNLABELED = 0x97; /* (J3100) */
public static final int KEY_NUMPADENTER = 0x9C; /* Enter on numeric keypad */
public static final int KEY_RCONTROL = 0x9D;
public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */
public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */
public static final int KEY_DIVIDE = 0xB5; /* / on numeric keypad */
public static final int KEY_SYSRQ = 0xB7;
@ -188,6 +193,7 @@ public class Keyboard {
public static final int KEY_NEXT = 0xD1; /* PgDn on arrow keypad */
public static final int KEY_INSERT = 0xD2; /* Insert on arrow keypad */
public static final int KEY_DELETE = 0xD3; /* Delete on arrow keypad */
public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */
public static final int KEY_LMETA = 0xDB; /* Left Windows/Option key */
/**
* The left windows key, mapped to KEY_LMETA

View File

@ -108,6 +108,7 @@ final class MacOSXNativeKeyboard extends EventQueue {
nativeToLwjglMap.put((Short)(short)0x07, Keyboard.KEY_X);
nativeToLwjglMap.put((Short)(short)0x10, Keyboard.KEY_Y);
nativeToLwjglMap.put((Short)(short)0x06, Keyboard.KEY_Z);
nativeToLwjglMap.put((Short)(short)0x0A, Keyboard.KEY_SECTION);
nativeToLwjglMap.put((Short)(short)0x2B, Keyboard.KEY_COMMA);
nativeToLwjglMap.put((Short)(short)0x2C, Keyboard.KEY_SLASH);
nativeToLwjglMap.put((Short)(short)0x2F, Keyboard.KEY_PERIOD);
@ -115,6 +116,7 @@ final class MacOSXNativeKeyboard extends EventQueue {
nativeToLwjglMap.put((Short)(short)0x29, Keyboard.KEY_SEMICOLON);
nativeToLwjglMap.put((Short)(short)0x129, Keyboard.KEY_COLON);
nativeToLwjglMap.put((Short)(short)0x2A, Keyboard.KEY_BACKSLASH);
nativeToLwjglMap.put((Short)(short)0x47, Keyboard.KEY_CLEAR);
nativeToLwjglMap.put((Short)(short)0x52, Keyboard.KEY_NUMPAD0);
nativeToLwjglMap.put((Short)(short)0x53, Keyboard.KEY_NUMPAD1);
nativeToLwjglMap.put((Short)(short)0x54, Keyboard.KEY_NUMPAD2);
@ -125,6 +127,7 @@ final class MacOSXNativeKeyboard extends EventQueue {
nativeToLwjglMap.put((Short)(short)0x59, Keyboard.KEY_NUMPAD7);
nativeToLwjglMap.put((Short)(short)0x5B, Keyboard.KEY_NUMPAD8);
nativeToLwjglMap.put((Short)(short)0x5C, Keyboard.KEY_NUMPAD9);
nativeToLwjglMap.put((Short)(short)0x4C, Keyboard.KEY_NUMPADENTER);
nativeToLwjglMap.put((Short)(short)0x7A, Keyboard.KEY_F1);
nativeToLwjglMap.put((Short)(short)0x78, Keyboard.KEY_F2);
nativeToLwjglMap.put((Short)(short)0x63, Keyboard.KEY_F3);
@ -140,7 +143,14 @@ final class MacOSXNativeKeyboard extends EventQueue {
nativeToLwjglMap.put((Short)(short)0x69, Keyboard.KEY_F13);
nativeToLwjglMap.put((Short)(short)0x6B, Keyboard.KEY_F14);
nativeToLwjglMap.put((Short)(short)0x71, Keyboard.KEY_F15);
nativeToLwjglMap.put((Short)(short)0x72, Keyboard.KEY_HOME);
nativeToLwjglMap.put((Short)(short)0x6A, Keyboard.KEY_F16);
nativeToLwjglMap.put((Short)(short)0x40, Keyboard.KEY_F17);
nativeToLwjglMap.put((Short)(short)0x4F, Keyboard.KEY_F18);
nativeToLwjglMap.put((Short)(short)0x50, Keyboard.KEY_F19);
nativeToLwjglMap.put((Short)(short)0x72, Keyboard.KEY_INSERT);
nativeToLwjglMap.put((Short)(short)0x73, Keyboard.KEY_HOME);
nativeToLwjglMap.put((Short)(short)0x77, Keyboard.KEY_END);
nativeToLwjglMap.put((Short)(short)0x75, Keyboard.KEY_DELETE);
nativeToLwjglMap.put((Short)(short)0x18, Keyboard.KEY_EQUALS);
nativeToLwjglMap.put((Short)(short)0x7B, Keyboard.KEY_LEFT);
nativeToLwjglMap.put((Short)(short)0x7C, Keyboard.KEY_RIGHT);
@ -170,7 +180,7 @@ final class MacOSXNativeKeyboard extends EventQueue {
nativeToLwjglMap.put((Short)(short)0xF3, Keyboard.KEY_LMENU);
nativeToLwjglMap.put((Short)(short)0x3A, Keyboard.KEY_LMENU);
nativeToLwjglMap.put((Short)(short)0x3D, Keyboard.KEY_RMENU);
nativeToLwjglMap.put((Short)(short)0xF4, Keyboard.KEY_RETURN);
nativeToLwjglMap.put((Short)(short)0xF4, Keyboard.KEY_LMETA);
nativeToLwjglMap.put((Short)(short)0xF5, Keyboard.KEY_NUMLOCK);
nativeToLwjglMap.put((Short)(short)0x27, Keyboard.KEY_APOSTROPHE);