kGlfwToLogicalKey top-level constant

const kGlfwToLogicalKey = <int, LogicalKeyboardKey>{65 : LogicalKeyboardKey.keyA, 66 : LogicalKeyboardKey.keyB, 67 : LogicalKeyboardKey.keyC, 68 : LogicalKeyboardKey.keyD, 69 : LogicalKeyboardKey.keyE, 70 : LogicalKeyboardKey.keyF, 71 : LogicalKeyboardKey.keyG, 72 : LogicalKeyboardKey.keyH, 73 : LogicalKeyboardKey.keyI, 74 : LogicalKeyboardKey.keyJ, 75 : LogicalKeyboardKey.keyK, 76 : LogicalKeyboardKey.keyL, 77 : LogicalKeyboardKey.keyM, 78 : LogicalKeyboardKey.keyN, 79 : LogicalKeyboardKey.keyO, 80 : LogicalKeyboardKey.keyP, 81 : LogicalKeyboardKey.keyQ, 82 : LogicalKeyboardKey.keyR, 83 : LogicalKeyboardKey.keyS, 84 : LogicalKeyboardKey.keyT, 85 : LogicalKeyboardKey.keyU, 86 : LogicalKeyboardKey.keyV, 87 : LogicalKeyboardKey.keyW, 88 : LogicalKeyboardKey.keyX, 89 : LogicalKeyboardKey.keyY, 90 : LogicalKeyboardKey.keyZ, 49 : LogicalKeyboardKey.digit1, 50 : LogicalKeyboardKey.digit2, 51 : LogicalKeyboardKey.digit3, 52 : LogicalKeyboardKey.digit4, 53 : LogicalKeyboardKey.digit5, 54 : LogicalKeyboardKey.digit6, 55 : LogicalKeyboardKey.digit7, 56 : LogicalKeyboardKey.digit8, 57 : LogicalKeyboardKey.digit9, 48 : LogicalKeyboardKey.digit0, 257 : LogicalKeyboardKey.enter, 256 : LogicalKeyboardKey.escape, 259 : LogicalKeyboardKey.backspace, 258 : LogicalKeyboardKey.tab, 32 : LogicalKeyboardKey.space, 45 : LogicalKeyboardKey.minus, 61 : LogicalKeyboardKey.equal, 91 : LogicalKeyboardKey.bracketLeft, 93 : LogicalKeyboardKey.bracketRight, 92 : LogicalKeyboardKey.backslash, 59 : LogicalKeyboardKey.semicolon, 39 : LogicalKeyboardKey.quote, 96 : LogicalKeyboardKey.backquote, 44 : LogicalKeyboardKey.comma, 46 : LogicalKeyboardKey.period, 47 : LogicalKeyboardKey.slash, 280 : LogicalKeyboardKey.capsLock, 290 : LogicalKeyboardKey.f1, 291 : LogicalKeyboardKey.f2, 292 : LogicalKeyboardKey.f3, 293 : LogicalKeyboardKey.f4, 294 : LogicalKeyboardKey.f5, 295 : LogicalKeyboardKey.f6, 296 : LogicalKeyboardKey.f7, 297 : LogicalKeyboardKey.f8, 298 : LogicalKeyboardKey.f9, 299 : LogicalKeyboardKey.f10, 300 : LogicalKeyboardKey.f11, 301 : LogicalKeyboardKey.f12, 283 : LogicalKeyboardKey.printScreen, 284 : LogicalKeyboardKey.pause, 260 : LogicalKeyboardKey.insert, 268 : LogicalKeyboardKey.home, 266 : LogicalKeyboardKey.pageUp, 261 : LogicalKeyboardKey.delete, 269 : LogicalKeyboardKey.end, 267 : LogicalKeyboardKey.pageDown, 262 : LogicalKeyboardKey.arrowRight, 263 : LogicalKeyboardKey.arrowLeft, 264 : LogicalKeyboardKey.arrowDown, 265 : LogicalKeyboardKey.arrowUp, 282 : LogicalKeyboardKey.numLock, 331 : LogicalKeyboardKey.numpadDivide, 332 : LogicalKeyboardKey.numpadMultiply, 334 : LogicalKeyboardKey.numpadAdd, 335 : LogicalKeyboardKey.numpadEnter, 321 : LogicalKeyboardKey.numpad1, 322 : LogicalKeyboardKey.numpad2, 323 : LogicalKeyboardKey.numpad3, 324 : LogicalKeyboardKey.numpad4, 325 : LogicalKeyboardKey.numpad5, 326 : LogicalKeyboardKey.numpad6, 327 : LogicalKeyboardKey.numpad7, 328 : LogicalKeyboardKey.numpad8, 329 : LogicalKeyboardKey.numpad9, 320 : LogicalKeyboardKey.numpad0, 330 : LogicalKeyboardKey.numpadDecimal, 348 : LogicalKeyboardKey.contextMenu, 336 : LogicalKeyboardKey.numpadEqual, 302 : LogicalKeyboardKey.f13, 303 : LogicalKeyboardKey.f14, 304 : LogicalKeyboardKey.f15, 305 : LogicalKeyboardKey.f16, 306 : LogicalKeyboardKey.f17, 307 : LogicalKeyboardKey.f18, 308 : LogicalKeyboardKey.f19, 309 : LogicalKeyboardKey.f20, 310 : LogicalKeyboardKey.f21, 311 : LogicalKeyboardKey.f22, 312 : LogicalKeyboardKey.f23, 341 : LogicalKeyboardKey.controlLeft, 340 : LogicalKeyboardKey.shiftLeft, 342 : LogicalKeyboardKey.altLeft, 343 : LogicalKeyboardKey.metaLeft, 345 : LogicalKeyboardKey.controlRight, 344 : LogicalKeyboardKey.shiftRight, 346 : LogicalKeyboardKey.altRight, 347 : LogicalKeyboardKey.metaRight}

Maps GLFW-specific key codes to the matching LogicalKeyboardKey.

Implementation

const Map<int, LogicalKeyboardKey> kGlfwToLogicalKey = <int, LogicalKeyboardKey>{
  65: LogicalKeyboardKey.keyA,
  66: LogicalKeyboardKey.keyB,
  67: LogicalKeyboardKey.keyC,
  68: LogicalKeyboardKey.keyD,
  69: LogicalKeyboardKey.keyE,
  70: LogicalKeyboardKey.keyF,
  71: LogicalKeyboardKey.keyG,
  72: LogicalKeyboardKey.keyH,
  73: LogicalKeyboardKey.keyI,
  74: LogicalKeyboardKey.keyJ,
  75: LogicalKeyboardKey.keyK,
  76: LogicalKeyboardKey.keyL,
  77: LogicalKeyboardKey.keyM,
  78: LogicalKeyboardKey.keyN,
  79: LogicalKeyboardKey.keyO,
  80: LogicalKeyboardKey.keyP,
  81: LogicalKeyboardKey.keyQ,
  82: LogicalKeyboardKey.keyR,
  83: LogicalKeyboardKey.keyS,
  84: LogicalKeyboardKey.keyT,
  85: LogicalKeyboardKey.keyU,
  86: LogicalKeyboardKey.keyV,
  87: LogicalKeyboardKey.keyW,
  88: LogicalKeyboardKey.keyX,
  89: LogicalKeyboardKey.keyY,
  90: LogicalKeyboardKey.keyZ,
  49: LogicalKeyboardKey.digit1,
  50: LogicalKeyboardKey.digit2,
  51: LogicalKeyboardKey.digit3,
  52: LogicalKeyboardKey.digit4,
  53: LogicalKeyboardKey.digit5,
  54: LogicalKeyboardKey.digit6,
  55: LogicalKeyboardKey.digit7,
  56: LogicalKeyboardKey.digit8,
  57: LogicalKeyboardKey.digit9,
  48: LogicalKeyboardKey.digit0,
  257: LogicalKeyboardKey.enter,
  256: LogicalKeyboardKey.escape,
  259: LogicalKeyboardKey.backspace,
  258: LogicalKeyboardKey.tab,
  32: LogicalKeyboardKey.space,
  45: LogicalKeyboardKey.minus,
  61: LogicalKeyboardKey.equal,
  91: LogicalKeyboardKey.bracketLeft,
  93: LogicalKeyboardKey.bracketRight,
  92: LogicalKeyboardKey.backslash,
  59: LogicalKeyboardKey.semicolon,
  39: LogicalKeyboardKey.quote,
  96: LogicalKeyboardKey.backquote,
  44: LogicalKeyboardKey.comma,
  46: LogicalKeyboardKey.period,
  47: LogicalKeyboardKey.slash,
  280: LogicalKeyboardKey.capsLock,
  290: LogicalKeyboardKey.f1,
  291: LogicalKeyboardKey.f2,
  292: LogicalKeyboardKey.f3,
  293: LogicalKeyboardKey.f4,
  294: LogicalKeyboardKey.f5,
  295: LogicalKeyboardKey.f6,
  296: LogicalKeyboardKey.f7,
  297: LogicalKeyboardKey.f8,
  298: LogicalKeyboardKey.f9,
  299: LogicalKeyboardKey.f10,
  300: LogicalKeyboardKey.f11,
  301: LogicalKeyboardKey.f12,
  283: LogicalKeyboardKey.printScreen,
  284: LogicalKeyboardKey.pause,
  260: LogicalKeyboardKey.insert,
  268: LogicalKeyboardKey.home,
  266: LogicalKeyboardKey.pageUp,
  261: LogicalKeyboardKey.delete,
  269: LogicalKeyboardKey.end,
  267: LogicalKeyboardKey.pageDown,
  262: LogicalKeyboardKey.arrowRight,
  263: LogicalKeyboardKey.arrowLeft,
  264: LogicalKeyboardKey.arrowDown,
  265: LogicalKeyboardKey.arrowUp,
  282: LogicalKeyboardKey.numLock,
  331: LogicalKeyboardKey.numpadDivide,
  332: LogicalKeyboardKey.numpadMultiply,
  334: LogicalKeyboardKey.numpadAdd,
  335: LogicalKeyboardKey.numpadEnter,
  321: LogicalKeyboardKey.numpad1,
  322: LogicalKeyboardKey.numpad2,
  323: LogicalKeyboardKey.numpad3,
  324: LogicalKeyboardKey.numpad4,
  325: LogicalKeyboardKey.numpad5,
  326: LogicalKeyboardKey.numpad6,
  327: LogicalKeyboardKey.numpad7,
  328: LogicalKeyboardKey.numpad8,
  329: LogicalKeyboardKey.numpad9,
  320: LogicalKeyboardKey.numpad0,
  330: LogicalKeyboardKey.numpadDecimal,
  348: LogicalKeyboardKey.contextMenu,
  336: LogicalKeyboardKey.numpadEqual,
  302: LogicalKeyboardKey.f13,
  303: LogicalKeyboardKey.f14,
  304: LogicalKeyboardKey.f15,
  305: LogicalKeyboardKey.f16,
  306: LogicalKeyboardKey.f17,
  307: LogicalKeyboardKey.f18,
  308: LogicalKeyboardKey.f19,
  309: LogicalKeyboardKey.f20,
  310: LogicalKeyboardKey.f21,
  311: LogicalKeyboardKey.f22,
  312: LogicalKeyboardKey.f23,
  341: LogicalKeyboardKey.controlLeft,
  340: LogicalKeyboardKey.shiftLeft,
  342: LogicalKeyboardKey.altLeft,
  343: LogicalKeyboardKey.metaLeft,
  345: LogicalKeyboardKey.controlRight,
  344: LogicalKeyboardKey.shiftRight,
  346: LogicalKeyboardKey.altRight,
  347: LogicalKeyboardKey.metaRight,
}