return "NumPad-" + (char) (keyCode - VK_NUMPAD0);
return "NumPad-" + (keyCode - VK_NUMPAD0);
  public static String getKeyText(int keyCode)  {    switch (keyCode)      {      case VK_CANCEL:        return "Cancel";      case VK_BACK_SPACE:        return "Backspace";      case VK_TAB:        return "Tab";      case VK_ENTER:        return "Enter";      case VK_CLEAR:        return "Clear";      case VK_SHIFT:        return "Shift";      case VK_CONTROL:        return "Ctrl";      case VK_ALT:        return "Alt";      case VK_PAUSE:        return "Pause";      case VK_CAPS_LOCK:        return "Caps Lock";      case VK_KANA:        return "Kana";      case VK_FINAL:        return "Final";      case VK_KANJI:        return "Kanji";      case VK_ESCAPE:        return "Escape";      case VK_CONVERT:        return "Convert";      case VK_NONCONVERT:        return "No Convert";      case VK_ACCEPT:        return "Accept";      case VK_MODECHANGE:        return "Mode Change";      case VK_SPACE:        return "Space";      case VK_PAGE_UP:        return "Page Up";      case VK_PAGE_DOWN:        return "Page Down";      case VK_END:        return "End";      case VK_HOME:        return "Home";      case VK_LEFT:      case VK_KP_LEFT:        return "Left";      case VK_UP:      case VK_KP_UP:        return "Up";      case VK_RIGHT:      case VK_KP_RIGHT:        return "Right";      case VK_DOWN:      case VK_KP_DOWN:        return "Down";      case VK_MINUS:        return "Minus";      case VK_MULTIPLY:        return "NumPad *";      case VK_ADD:        return "NumPad +";      case VK_SEPARATOR:        return "NumPad ,";      case VK_SUBTRACT:        return "NumPad -";      case VK_DECIMAL:        return "NumPad .";      case VK_DIVIDE:        return "NumPad /";      case VK_DELETE:        return "Delete";      case VK_DEAD_GRAVE:        return "Dead Grave";      case VK_DEAD_ACUTE:        return "Dead Acute";      case VK_DEAD_CIRCUMFLEX:        return "Dead Circumflex";      case VK_DEAD_TILDE:        return "Dead Tilde";      case VK_DEAD_MACRON:        return "Dead Macron";      case VK_DEAD_BREVE:        return "Dead Breve";      case VK_DEAD_ABOVEDOT:        return "Dead Above Dot";      case VK_DEAD_DIAERESIS:        return "Dead Diaeresis";      case VK_DEAD_ABOVERING:        return "Dead Above Ring";      case VK_DEAD_DOUBLEACUTE:        return "Dead Double Acute";      case VK_DEAD_CARON:        return "Dead Caron";      case VK_DEAD_CEDILLA:        return "Dead Cedilla";      case VK_DEAD_OGONEK:        return "Dead Ogonek";      case VK_DEAD_IOTA:        return "Dead Iota";      case VK_DEAD_VOICED_SOUND:        return "Dead Voiced Sound";      case VK_DEAD_SEMIVOICED_SOUND:        return "Dead Semivoiced Sound";      case VK_NUM_LOCK:        return "Num Lock";      case VK_SCROLL_LOCK:        return "Scroll Lock";      case VK_AMPERSAND:        return "Ampersand";      case VK_ASTERISK:        return "Asterisk";      case VK_QUOTEDBL:        return "Double Quote";      case VK_LESS:        return "Less";      case VK_PRINTSCREEN:        return "Print Screen";      case VK_INSERT:        return "Insert";      case VK_HELP:        return "Help";      case VK_META:        return "Meta";      case VK_GREATER:        return "Greater";      case VK_BRACELEFT:        return "Left Brace";      case VK_BRACERIGHT:        return "Right Brace";      case VK_BACK_QUOTE:        return "Back Quote";      case VK_QUOTE:        return "Quote";      case VK_ALPHANUMERIC:        return "Alphanumeric";      case VK_KATAKANA:        return "Katakana";      case VK_HIRAGANA:        return "Hiragana";      case VK_FULL_WIDTH:        return "Full-Width";      case VK_HALF_WIDTH:        return "Half-Width";      case VK_ROMAN_CHARACTERS:        return "Roman Characters";      case VK_ALL_CANDIDATES:        return "All Candidates";      case VK_PREVIOUS_CANDIDATE:        return "Previous Candidate";      case VK_CODE_INPUT:        return "Code Input";      case VK_JAPANESE_KATAKANA:        return "Japanese Katakana";      case VK_JAPANESE_HIRAGANA:        return "Japanese Hiragana";      case VK_JAPANESE_ROMAN:        return "Japanese Roman";      case VK_KANA_LOCK:        return "Kana Lock";      case VK_INPUT_METHOD_ON_OFF:        return "Input Method On/Off";      case VK_AT:        return "At";      case VK_COLON:        return "Colon";      case VK_CIRCUMFLEX:        return "Circumflex";      case VK_DOLLAR:        return "Dollar";      case VK_EURO_SIGN:        return "Euro";      case VK_EXCLAMATION_MARK:        return "Exclamation Mark";      case VK_INVERTED_EXCLAMATION_MARK:        return "Inverted Exclamation Mark";      case VK_LEFT_PARENTHESIS:        return "Left Parenthesis";      case VK_NUMBER_SIGN:        return "Number Sign";      case VK_PLUS:        return "Plus";      case VK_RIGHT_PARENTHESIS:        return "Right Parenthesis";      case VK_UNDERSCORE:        return "Underscore";      case VK_COMPOSE:        return "Compose";      case VK_ALT_GRAPH:        return "Alt Graph";      case VK_STOP:        return "Stop";      case VK_AGAIN:        return "Again";      case VK_PROPS:        return "Props";      case VK_UNDO:        return "Undo";      case VK_COPY:        return "Copy";      case VK_PASTE:        return "Paste";      case VK_FIND:        return "Find";      case VK_CUT:        return "Cut";      case VK_COMMA:      case VK_PERIOD:      case VK_SLASH:      case VK_0:      case VK_1:      case VK_2:      case VK_3:      case VK_4:      case VK_5:      case VK_6:      case VK_7:      case VK_8:      case VK_9:      case VK_SEMICOLON:      case VK_EQUALS:      case VK_A:      case VK_B:      case VK_C:      case VK_D:      case VK_E:      case VK_F:      case VK_G:      case VK_H:      case VK_I:      case VK_J:      case VK_K:      case VK_L:      case VK_M:      case VK_N:      case VK_O:      case VK_P:      case VK_Q:      case VK_R:      case VK_S:      case VK_T:      case VK_U:      case VK_V:      case VK_W:      case VK_X:      case VK_Y:      case VK_Z:      case VK_OPEN_BRACKET:      case VK_BACK_SLASH:      case VK_CLOSE_BRACKET:        return "" + (char) keyCode;      case VK_NUMPAD0:      case VK_NUMPAD1:      case VK_NUMPAD2:      case VK_NUMPAD3:      case VK_NUMPAD4:      case VK_NUMPAD5:      case VK_NUMPAD6:      case VK_NUMPAD7:      case VK_NUMPAD8:      case VK_NUMPAD9:        return "NumPad-" + (char) (keyCode - VK_NUMPAD0);      case VK_F1:      case VK_F2:      case VK_F3:      case VK_F4:      case VK_F5:      case VK_F6:      case VK_F7:      case VK_F8:      case VK_F9:      case VK_F10:      case VK_F11:      case VK_F12:        return "F" + (keyCode - (VK_F1 - 1));      case VK_F13:      case VK_F14:      case VK_F15:      case VK_F16:      case VK_F17:      case VK_F18:      case VK_F19:      case VK_F20:      case VK_F21:      case VK_F22:      case VK_F23:      case VK_F24:        return "F" + (keyCode - (VK_F13 - 13));      default:        // This is funky on negative numbers, but that's Sun's fault.        return "Unknown keyCode: 0x" + (keyCode < 0 ? "-" : "")          + Integer.toHexString(Math.abs(keyCode));      }  }