Open DPachs opened 2 years ago
Thx, that's very useful. Here it is in Kotlin:
mapOf(
NativeKeyEvent.VC_ESCAPE to KeyCode.ESCAPE,
NativeKeyEvent.VC_F1 to KeyCode.F1,
NativeKeyEvent.VC_F2 to KeyCode.F2,
NativeKeyEvent.VC_F3 to KeyCode.F3,
NativeKeyEvent.VC_F4 to KeyCode.F4,
NativeKeyEvent.VC_F5 to KeyCode.F5,
NativeKeyEvent.VC_F6 to KeyCode.F6,
NativeKeyEvent.VC_F7 to KeyCode.F7,
NativeKeyEvent.VC_F8 to KeyCode.F8,
NativeKeyEvent.VC_F9 to KeyCode.F9,
NativeKeyEvent.VC_F10 to KeyCode.F10,
NativeKeyEvent.VC_F11 to KeyCode.F11,
NativeKeyEvent.VC_F12 to KeyCode.F12,
NativeKeyEvent.VC_F13 to KeyCode.F13,
NativeKeyEvent.VC_F14 to KeyCode.F14,
NativeKeyEvent.VC_F15 to KeyCode.F15,
NativeKeyEvent.VC_F16 to KeyCode.F16,
NativeKeyEvent.VC_F17 to KeyCode.F17,
NativeKeyEvent.VC_F18 to KeyCode.F18,
NativeKeyEvent.VC_F19 to KeyCode.F19,
NativeKeyEvent.VC_F20 to KeyCode.F20,
NativeKeyEvent.VC_F21 to KeyCode.F21,
NativeKeyEvent.VC_F22 to KeyCode.F22,
NativeKeyEvent.VC_F23 to KeyCode.F23,
NativeKeyEvent.VC_F24 to KeyCode.F24,
NativeKeyEvent.VC_BACKQUOTE to KeyCode.BACK_QUOTE,
NativeKeyEvent.VC_1 to KeyCode.DIGIT1,
NativeKeyEvent.VC_2 to KeyCode.DIGIT2,
NativeKeyEvent.VC_3 to KeyCode.DIGIT3,
NativeKeyEvent.VC_4 to KeyCode.DIGIT4,
NativeKeyEvent.VC_5 to KeyCode.DIGIT5,
NativeKeyEvent.VC_6 to KeyCode.DIGIT6,
NativeKeyEvent.VC_7 to KeyCode.DIGIT7,
NativeKeyEvent.VC_8 to KeyCode.DIGIT8,
NativeKeyEvent.VC_9 to KeyCode.DIGIT9,
NativeKeyEvent.VC_0 to KeyCode.DIGIT0,
NativeKeyEvent.VC_MINUS to KeyCode.MINUS,
NativeKeyEvent.VC_EQUALS to KeyCode.EQUALS,
NativeKeyEvent.VC_BACKSPACE to KeyCode.BACK_SPACE,
NativeKeyEvent.VC_TAB to KeyCode.TAB,
NativeKeyEvent.VC_CAPS_LOCK to KeyCode.CAPS,
NativeKeyEvent.VC_A to KeyCode.A,
NativeKeyEvent.VC_B to KeyCode.B,
NativeKeyEvent.VC_C to KeyCode.C,
NativeKeyEvent.VC_D to KeyCode.D,
NativeKeyEvent.VC_E to KeyCode.E,
NativeKeyEvent.VC_F to KeyCode.F,
NativeKeyEvent.VC_G to KeyCode.G,
NativeKeyEvent.VC_H to KeyCode.H,
NativeKeyEvent.VC_I to KeyCode.I,
NativeKeyEvent.VC_J to KeyCode.J,
NativeKeyEvent.VC_K to KeyCode.K,
NativeKeyEvent.VC_L to KeyCode.L,
NativeKeyEvent.VC_M to KeyCode.M,
NativeKeyEvent.VC_N to KeyCode.N,
NativeKeyEvent.VC_O to KeyCode.O,
NativeKeyEvent.VC_P to KeyCode.P,
NativeKeyEvent.VC_Q to KeyCode.Q,
NativeKeyEvent.VC_R to KeyCode.R,
NativeKeyEvent.VC_S to KeyCode.S,
NativeKeyEvent.VC_T to KeyCode.T,
NativeKeyEvent.VC_U to KeyCode.U,
NativeKeyEvent.VC_V to KeyCode.V,
NativeKeyEvent.VC_W to KeyCode.W,
NativeKeyEvent.VC_X to KeyCode.X,
NativeKeyEvent.VC_Y to KeyCode.Y,
NativeKeyEvent.VC_Z to KeyCode.Z,
NativeKeyEvent.VC_OPEN_BRACKET to KeyCode.OPEN_BRACKET,
NativeKeyEvent.VC_CLOSE_BRACKET to KeyCode.CLOSE_BRACKET,
NativeKeyEvent.VC_BACK_SLASH to KeyCode.BACK_SLASH,
NativeKeyEvent.VC_SEMICOLON to KeyCode.SEMICOLON,
NativeKeyEvent.VC_QUOTE to KeyCode.QUOTE,
NativeKeyEvent.VC_ENTER to KeyCode.ENTER,
NativeKeyEvent.VC_COMMA to KeyCode.COMMA,
NativeKeyEvent.VC_PERIOD to KeyCode.PERIOD,
NativeKeyEvent.VC_SLASH to KeyCode.SLASH,
NativeKeyEvent.VC_SPACE to KeyCode.SPACE,
NativeKeyEvent.VC_PRINTSCREEN to KeyCode.PRINTSCREEN,
NativeKeyEvent.VC_SCROLL_LOCK to KeyCode.SCROLL_LOCK,
NativeKeyEvent.VC_PAUSE to KeyCode.PAUSE,
NativeKeyEvent.VC_INSERT to KeyCode.INSERT,
NativeKeyEvent.VC_DELETE to KeyCode.DELETE,
NativeKeyEvent.VC_HOME to KeyCode.HOME,
NativeKeyEvent.VC_END to KeyCode.END,
NativeKeyEvent.VC_PAGE_UP to KeyCode.PAGE_UP,
NativeKeyEvent.VC_PAGE_DOWN to KeyCode.PAGE_DOWN,
NativeKeyEvent.VC_UP to KeyCode.UP,
NativeKeyEvent.VC_LEFT to KeyCode.LEFT,
NativeKeyEvent.VC_CLEAR to KeyCode.CLEAR,
NativeKeyEvent.VC_RIGHT to KeyCode.RIGHT,
NativeKeyEvent.VC_DOWN to KeyCode.DOWN,
NativeKeyEvent.VC_NUM_LOCK to KeyCode.NUM_LOCK,
NativeKeyEvent.VC_SEPARATOR to KeyCode.SEPARATOR,
NativeKeyEvent.VC_SHIFT to KeyCode.SHIFT,
NativeKeyEvent.VC_CONTROL to KeyCode.CONTROL,
NativeKeyEvent.VC_ALT to KeyCode.ALT,
NativeKeyEvent.VC_META to KeyCode.META,
NativeKeyEvent.VC_CONTEXT_MENU to KeyCode.CONTEXT_MENU,
NativeKeyEvent.VC_POWER to KeyCode.POWER,
NativeKeyEvent.VC_MEDIA_PLAY to KeyCode.PLAY,
NativeKeyEvent.VC_MEDIA_STOP to KeyCode.STOP,
NativeKeyEvent.VC_MEDIA_EJECT to KeyCode.EJECT_TOGGLE,
NativeKeyEvent.VC_VOLUME_MUTE to KeyCode.MUTE,
NativeKeyEvent.VC_VOLUME_UP to KeyCode.UP,
NativeKeyEvent.VC_VOLUME_DOWN to KeyCode.DOWN,
NativeKeyEvent.VC_KATAKANA to KeyCode.KATAKANA,
NativeKeyEvent.VC_UNDERSCORE to KeyCode.UNDERSCORE,
NativeKeyEvent.VC_KANJI to KeyCode.KANJI,
NativeKeyEvent.VC_HIRAGANA to KeyCode.HIRAGANA,
NativeKeyEvent.VC_SUN_HELP to KeyCode.HELP,
NativeKeyEvent.VC_SUN_STOP to KeyCode.STOP,
NativeKeyEvent.VC_SUN_FIND to KeyCode.FIND,
NativeKeyEvent.VC_SUN_AGAIN to KeyCode.AGAIN,
NativeKeyEvent.VC_SUN_UNDO to KeyCode.UNDO,
NativeKeyEvent.VC_SUN_COPY to KeyCode.COPY,
NativeKeyEvent.VC_SUN_INSERT to KeyCode.INSERT,
NativeKeyEvent.VC_SUN_CUT to KeyCode.CUT
)
Not exactly an issue, but recently i needed to use the library with Scala and JavaFX. Thanks for the amazing library by the way. Here's a Scala
Map[Int, KeyCode]
if someone needs it: