1 package com.jme3.input; 2 3 import static com.jme3.input.KeyInput.*; 4 5 public class KeyNames { 6 7 private static final String[] KEY_NAMES = new String[0xFF]; 8 9 static { 10 KEY_NAMES[KEY_0] = "0"; 11 KEY_NAMES[KEY_1] = "1"; 12 KEY_NAMES[KEY_2] = "2"; 13 KEY_NAMES[KEY_3] = "3"; 14 KEY_NAMES[KEY_4] = "4"; 15 KEY_NAMES[KEY_5] = "5"; 16 KEY_NAMES[KEY_6] = "6"; 17 KEY_NAMES[KEY_7] = "7"; 18 KEY_NAMES[KEY_8] = "8"; 19 KEY_NAMES[KEY_9] = "9"; 20 21 KEY_NAMES[KEY_Q] = "Q"; 22 KEY_NAMES[KEY_W] = "W"; 23 KEY_NAMES[KEY_E] = "E"; 24 KEY_NAMES[KEY_R] = "R"; 25 KEY_NAMES[KEY_T] = "T"; 26 KEY_NAMES[KEY_Y] = "Y"; 27 KEY_NAMES[KEY_U] = "U"; 28 KEY_NAMES[KEY_I] = "I"; 29 KEY_NAMES[KEY_O] = "O"; 30 KEY_NAMES[KEY_P] = "P"; 31 KEY_NAMES[KEY_A] = "A"; 32 KEY_NAMES[KEY_S] = "S"; 33 KEY_NAMES[KEY_D] = "D"; 34 KEY_NAMES[KEY_F] = "F"; 35 KEY_NAMES[KEY_G] = "G"; 36 KEY_NAMES[KEY_H] = "H"; 37 KEY_NAMES[KEY_J] = "J"; 38 KEY_NAMES[KEY_K] = "K"; 39 KEY_NAMES[KEY_L] = "L"; 40 KEY_NAMES[KEY_Z] = "Z"; 41 KEY_NAMES[KEY_X] = "X"; 42 KEY_NAMES[KEY_C] = "C"; 43 KEY_NAMES[KEY_V] = "V"; 44 KEY_NAMES[KEY_B] = "B"; 45 KEY_NAMES[KEY_N] = "N"; 46 KEY_NAMES[KEY_M] = "M"; 47 48 KEY_NAMES[KEY_F1] = "F1"; 49 KEY_NAMES[KEY_F2] = "F2"; 50 KEY_NAMES[KEY_F3] = "F3"; 51 KEY_NAMES[KEY_F4] = "F4"; 52 KEY_NAMES[KEY_F5] = "F5"; 53 KEY_NAMES[KEY_F6] = "F6"; 54 KEY_NAMES[KEY_F7] = "F7"; 55 KEY_NAMES[KEY_F8] = "F8"; 56 KEY_NAMES[KEY_F9] = "F9"; 57 KEY_NAMES[KEY_F10] = "F10"; 58 KEY_NAMES[KEY_F11] = "F11"; 59 KEY_NAMES[KEY_F12] = "F12"; 60 KEY_NAMES[KEY_F13] = "F13"; 61 KEY_NAMES[KEY_F14] = "F14"; 62 KEY_NAMES[KEY_F15] = "F15"; 63 64 KEY_NAMES[KEY_NUMPAD0] = "Numpad 0"; 65 KEY_NAMES[KEY_NUMPAD1] = "Numpad 1"; 66 KEY_NAMES[KEY_NUMPAD2] = "Numpad 2"; 67 KEY_NAMES[KEY_NUMPAD3] = "Numpad 3"; 68 KEY_NAMES[KEY_NUMPAD4] = "Numpad 4"; 69 KEY_NAMES[KEY_NUMPAD5] = "Numpad 5"; 70 KEY_NAMES[KEY_NUMPAD6] = "Numpad 6"; 71 KEY_NAMES[KEY_NUMPAD7] = "Numpad 7"; 72 KEY_NAMES[KEY_NUMPAD8] = "Numpad 8"; 73 KEY_NAMES[KEY_NUMPAD9] = "Numpad 9"; 74 75 KEY_NAMES[KEY_NUMPADEQUALS] = "Numpad ="; 76 KEY_NAMES[KEY_NUMPADENTER] = "Numpad Enter"; 77 KEY_NAMES[KEY_NUMPADCOMMA] = "Numpad ."; 78 KEY_NAMES[KEY_DIVIDE] = "Numpad /"; 79 80 81 KEY_NAMES[KEY_LMENU] = "Left Alt"; 82 KEY_NAMES[KEY_RMENU] = "Right Alt"; 83 84 KEY_NAMES[KEY_LCONTROL] = "Left Ctrl"; 85 KEY_NAMES[KEY_RCONTROL] = "Right Ctrl"; 86 87 KEY_NAMES[KEY_LSHIFT] = "Left Shift"; 88 KEY_NAMES[KEY_RSHIFT] = "Right Shift"; 89 90 KEY_NAMES[KEY_LMETA] = "Left Option"; 91 KEY_NAMES[KEY_RMETA] = "Right Option"; 92 93 KEY_NAMES[KEY_MINUS] = "-"; 94 KEY_NAMES[KEY_EQUALS] = "="; 95 KEY_NAMES[KEY_LBRACKET] = "["; 96 KEY_NAMES[KEY_RBRACKET] = "]"; 97 KEY_NAMES[KEY_SEMICOLON] = ";"; 98 KEY_NAMES[KEY_APOSTROPHE] = "'"; 99 KEY_NAMES[KEY_GRAVE] = "`"; 100 KEY_NAMES[KEY_BACKSLASH] = "\\"; 101 KEY_NAMES[KEY_COMMA] = ","; 102 KEY_NAMES[KEY_PERIOD] = "."; 103 KEY_NAMES[KEY_SLASH] = "/"; 104 KEY_NAMES[KEY_MULTIPLY] = "*"; 105 KEY_NAMES[KEY_ADD] = "+"; 106 KEY_NAMES[KEY_COLON] = ":"; 107 KEY_NAMES[KEY_UNDERLINE] = "_"; 108 KEY_NAMES[KEY_AT] = "@"; 109 110 KEY_NAMES[KEY_APPS] = "Apps"; 111 KEY_NAMES[KEY_POWER] = "Power"; 112 KEY_NAMES[KEY_SLEEP] = "Sleep"; 113 114 KEY_NAMES[KEY_STOP] = "Stop"; 115 KEY_NAMES[KEY_ESCAPE] = "Esc"; 116 KEY_NAMES[KEY_RETURN] = "Enter"; 117 KEY_NAMES[KEY_SPACE] = "Space"; 118 KEY_NAMES[KEY_BACK] = "Backspace"; 119 KEY_NAMES[KEY_TAB] = "Tab"; 120 121 KEY_NAMES[KEY_SYSRQ] = "SysEq"; 122 KEY_NAMES[KEY_PAUSE] = "Pause"; 123 124 KEY_NAMES[KEY_HOME] = "Home"; 125 KEY_NAMES[KEY_PGUP] = "Page Up"; 126 KEY_NAMES[KEY_PGDN] = "Page Down"; 127 KEY_NAMES[KEY_END] = "End"; 128 KEY_NAMES[KEY_INSERT] = "Insert"; 129 KEY_NAMES[KEY_DELETE] = "Delete"; 130 131 KEY_NAMES[KEY_UP] = "Up"; 132 KEY_NAMES[KEY_LEFT] = "Left"; 133 KEY_NAMES[KEY_RIGHT] = "Right"; 134 KEY_NAMES[KEY_DOWN] = "Down"; 135 136 KEY_NAMES[KEY_NUMLOCK] = "Num Lock"; 137 KEY_NAMES[KEY_CAPITAL] = "Caps Lock"; 138 KEY_NAMES[KEY_SCROLL] = "Scroll Lock"; 139 140 KEY_NAMES[KEY_KANA] = "Kana"; 141 KEY_NAMES[KEY_CONVERT] = "Convert"; 142 KEY_NAMES[KEY_NOCONVERT] = "No Convert"; 143 KEY_NAMES[KEY_YEN] = "Yen"; 144 KEY_NAMES[KEY_CIRCUMFLEX] = "Circumflex"; 145 KEY_NAMES[KEY_KANJI] = "Kanji"; 146 KEY_NAMES[KEY_AX] = "Ax"; 147 KEY_NAMES[KEY_UNLABELED] = "Unlabeled"; 148 } 149 getName(int keyId)150 public String getName(int keyId){ 151 return KEY_NAMES[keyId]; 152 } 153 } 154