LoggingSystem.getLogger().warning("unsupported key:" + key); return 0x100 + key;
LoggingSystem.getLogger().warning( "unsupported key:" + key ); return 0x10000 + key;
    public static int toAWTCode(int key) {        switch (key) {        case KEY_ESCAPE:            return KeyEvent.VK_ESCAPE;        case KEY_1:            return KeyEvent.VK_1;        case KEY_2:            return KeyEvent.VK_2;        case KEY_3:            return KeyEvent.VK_3;        case KEY_4:            return KeyEvent.VK_4;        case KEY_5:            return KeyEvent.VK_5;        case KEY_6:            return KeyEvent.VK_6;        case KEY_7:            return KeyEvent.VK_7;        case KEY_8:            return KeyEvent.VK_8;        case KEY_9:            return KeyEvent.VK_9;        case KEY_0:            return KeyEvent.VK_0;        case KEY_MINUS:            return KeyEvent.VK_MINUS;        case KEY_EQUALS:            return KeyEvent.VK_EQUALS;        case KEY_BACK:            return KeyEvent.VK_BACK_SPACE;        case KEY_TAB:            return KeyEvent.VK_TAB;        case KEY_Q:            return KeyEvent.VK_Q;        case KEY_W:            return KeyEvent.VK_W;        case KEY_E:            return KeyEvent.VK_E;        case KEY_R:            return KeyEvent.VK_R;        case KEY_T:            return KeyEvent.VK_T;        case KEY_Y:            return KeyEvent.VK_Y;        case KEY_U:            return KeyEvent.VK_U;        case KEY_I:            return KeyEvent.VK_I;        case KEY_O:            return KeyEvent.VK_O;        case KEY_P:            return KeyEvent.VK_P;        case KEY_LBRACKET:            return KeyEvent.VK_OPEN_BRACKET;        case KEY_RBRACKET:            return KeyEvent.VK_CLOSE_BRACKET;        case KEY_RETURN:            return KeyEvent.VK_ENTER;        case KEY_LCONTROL:            return KeyEvent.VK_CONTROL;        case KEY_A:            return KeyEvent.VK_A;        case KEY_S:            return KeyEvent.VK_S;        case KEY_D:            return KeyEvent.VK_D;        case KEY_F:            return KeyEvent.VK_F;        case KEY_G:            return KeyEvent.VK_G;        case KEY_H:            return KeyEvent.VK_H;        case KEY_J:            return KeyEvent.VK_J;        case KEY_K:            return KeyEvent.VK_K;        case KEY_L:            return KeyEvent.VK_L;        case KEY_SEMICOLON:            return KeyEvent.VK_SEMICOLON;        case KEY_APOSTROPHE:            return KeyEvent.VK_QUOTE;        case KEY_GRAVE:            return KeyEvent.VK_DEAD_GRAVE;        case KEY_LSHIFT:            return KeyEvent.VK_SHIFT;        case KEY_BACKSLASH:            return KeyEvent.VK_BACK_SLASH;        case KEY_Z:            return KeyEvent.VK_Z;        case KEY_X:            return KeyEvent.VK_X;        case KEY_C:            return KeyEvent.VK_C;        case KEY_V:            return KeyEvent.VK_V;        case KEY_B:            return KeyEvent.VK_B;        case KEY_N:            return KeyEvent.VK_N;        case KEY_M:            return KeyEvent.VK_M;        case KEY_COMMA:            return KeyEvent.VK_COMMA;        case KEY_PERIOD:            return KeyEvent.VK_PERIOD;        case KEY_SLASH:            return KeyEvent.VK_SLASH;        case KEY_RSHIFT:            return KeyEvent.VK_SHIFT;        case KEY_MULTIPLY:            return KeyEvent.VK_MULTIPLY;        case KEY_SPACE:            return KeyEvent.VK_SPACE;        case KEY_CAPITAL:            return KeyEvent.VK_CAPS_LOCK;        case KEY_F1:            return KeyEvent.VK_F1;        case KEY_F2:            return KeyEvent.VK_F2;        case KEY_F3:            return KeyEvent.VK_F3;        case KEY_F4:            return KeyEvent.VK_F4;        case KEY_F5:            return KeyEvent.VK_F5;        case KEY_F6:            return KeyEvent.VK_F6;        case KEY_F7:            return KeyEvent.VK_F7;        case KEY_F8:            return KeyEvent.VK_F8;        case KEY_F9:            return KeyEvent.VK_F9;        case KEY_F10:            return KeyEvent.VK_F10;        case KEY_NUMLOCK:            return KeyEvent.VK_NUM_LOCK;        case KEY_SCROLL:            return KeyEvent.VK_SCROLL_LOCK;        case KEY_NUMPAD7:            return KeyEvent.VK_NUMPAD7;        case KEY_NUMPAD8:            return KeyEvent.VK_NUMPAD8;        case KEY_NUMPAD9:            return KeyEvent.VK_NUMPAD9;        case KEY_SUBTRACT:            return KeyEvent.VK_SUBTRACT;        case KEY_NUMPAD4:            return KeyEvent.VK_NUMPAD4;        case KEY_NUMPAD5:            return KeyEvent.VK_NUMPAD5;        case KEY_NUMPAD6:            return KeyEvent.VK_NUMPAD6;        case KEY_ADD:            return KeyEvent.VK_ADD;        case KEY_NUMPAD1:            return KeyEvent.VK_NUMPAD1;        case KEY_NUMPAD2:            return KeyEvent.VK_NUMPAD2;        case KEY_NUMPAD3:            return KeyEvent.VK_NUMPAD3;        case KEY_NUMPAD0:            return KeyEvent.VK_NUMPAD0;        case KEY_DECIMAL:            return KeyEvent.VK_DECIMAL;        case KEY_F11:            return KeyEvent.VK_F11;        case KEY_F12:            return KeyEvent.VK_F12;        case KEY_F13:            return KeyEvent.VK_F13;        case KEY_F14:            return KeyEvent.VK_F14;        case KEY_F15:            return KeyEvent.VK_F15;        case KEY_KANA:            return KeyEvent.VK_KANA;        case KEY_CONVERT:            return KeyEvent.VK_CONVERT;        case KEY_NOCONVERT:            return KeyEvent.VK_NONCONVERT;        case KEY_NUMPADEQUALS:            return KeyEvent.VK_EQUALS;        case KEY_CIRCUMFLEX:            return KeyEvent.VK_CIRCUMFLEX;        case KEY_AT:            return KeyEvent.VK_AT;        case KEY_COLON:            return KeyEvent.VK_COLON;        case KEY_UNDERLINE:            return KeyEvent.VK_UNDERSCORE;        case KEY_STOP:            return KeyEvent.VK_STOP;        case KEY_NUMPADENTER:            return KeyEvent.VK_ENTER;        case KEY_RCONTROL:            return KeyEvent.VK_CONTROL;        case KEY_NUMPADCOMMA:            return KeyEvent.VK_COMMA;        case KEY_DIVIDE:            return KeyEvent.VK_DIVIDE;        case KEY_PAUSE:            return KeyEvent.VK_PAUSE;        case KEY_HOME:            return KeyEvent.VK_HOME;        case KEY_UP:            return KeyEvent.VK_UP;        case KEY_PRIOR:            return KeyEvent.VK_PAGE_UP;        case KEY_LEFT:            return KeyEvent.VK_LEFT;        case KEY_RIGHT:            return KeyEvent.VK_RIGHT;        case KEY_END:            return KeyEvent.VK_END;        case KEY_DOWN:            return KeyEvent.VK_DOWN;        case KEY_NEXT:            return KeyEvent.VK_PAGE_DOWN;        case KEY_INSERT:            return KeyEvent.VK_INSERT;        case KEY_DELETE:            return KeyEvent.VK_DELETE;        case KEY_LMENU:            return KeyEvent.VK_ALT; //todo: location left        case KEY_RMENU:            return KeyEvent.VK_ALT; //todo: location right        }        LoggingSystem.getLogger().warning("unsupported key:" + key);        return 0x100 + key;    }