kAndroidToPhysicalKey top-level constant

const kAndroidToPhysicalKey = <int, PhysicalKeyboardKey>{205 : PhysicalKeyboardKey.suspend, 142 : PhysicalKeyboardKey.sleep, 143 : PhysicalKeyboardKey.wakeUp, 30 : PhysicalKeyboardKey.keyA, 48 : PhysicalKeyboardKey.keyB, 46 : PhysicalKeyboardKey.keyC, 32 : PhysicalKeyboardKey.keyD, 18 : PhysicalKeyboardKey.keyE, 33 : PhysicalKeyboardKey.keyF, 34 : PhysicalKeyboardKey.keyG, 35 : PhysicalKeyboardKey.keyH, 23 : PhysicalKeyboardKey.keyI, 36 : PhysicalKeyboardKey.keyJ, 37 : PhysicalKeyboardKey.keyK, 38 : PhysicalKeyboardKey.keyL, 50 : PhysicalKeyboardKey.keyM, 49 : PhysicalKeyboardKey.keyN, 24 : PhysicalKeyboardKey.keyO, 25 : PhysicalKeyboardKey.keyP, 16 : PhysicalKeyboardKey.keyQ, 19 : PhysicalKeyboardKey.keyR, 31 : PhysicalKeyboardKey.keyS, 20 : PhysicalKeyboardKey.keyT, 22 : PhysicalKeyboardKey.keyU, 47 : PhysicalKeyboardKey.keyV, 17 : PhysicalKeyboardKey.keyW, 45 : PhysicalKeyboardKey.keyX, 21 : PhysicalKeyboardKey.keyY, 44 : PhysicalKeyboardKey.keyZ, 2 : PhysicalKeyboardKey.digit1, 3 : PhysicalKeyboardKey.digit2, 4 : PhysicalKeyboardKey.digit3, 5 : PhysicalKeyboardKey.digit4, 6 : PhysicalKeyboardKey.digit5, 7 : PhysicalKeyboardKey.digit6, 8 : PhysicalKeyboardKey.digit7, 9 : PhysicalKeyboardKey.digit8, 10 : PhysicalKeyboardKey.digit9, 11 : PhysicalKeyboardKey.digit0, 28 : PhysicalKeyboardKey.enter, 1 : PhysicalKeyboardKey.escape, 14 : PhysicalKeyboardKey.backspace, 15 : PhysicalKeyboardKey.tab, 57 : PhysicalKeyboardKey.space, 12 : PhysicalKeyboardKey.minus, 13 : PhysicalKeyboardKey.equal, 26 : PhysicalKeyboardKey.bracketLeft, 27 : PhysicalKeyboardKey.bracketRight, 43 : PhysicalKeyboardKey.backslash, 86 : PhysicalKeyboardKey.backslash, 39 : PhysicalKeyboardKey.semicolon, 40 : PhysicalKeyboardKey.quote, 41 : PhysicalKeyboardKey.backquote, 51 : PhysicalKeyboardKey.comma, 52 : PhysicalKeyboardKey.period, 53 : PhysicalKeyboardKey.slash, 58 : PhysicalKeyboardKey.capsLock, 59 : PhysicalKeyboardKey.f1, 60 : PhysicalKeyboardKey.f2, 61 : PhysicalKeyboardKey.f3, 62 : PhysicalKeyboardKey.f4, 63 : PhysicalKeyboardKey.f5, 64 : PhysicalKeyboardKey.f6, 65 : PhysicalKeyboardKey.f7, 66 : PhysicalKeyboardKey.f8, 67 : PhysicalKeyboardKey.f9, 68 : PhysicalKeyboardKey.f10, 87 : PhysicalKeyboardKey.f11, 88 : PhysicalKeyboardKey.f12, 99 : PhysicalKeyboardKey.printScreen, 70 : PhysicalKeyboardKey.scrollLock, 119 : PhysicalKeyboardKey.pause, 411 : PhysicalKeyboardKey.pause, 110 : PhysicalKeyboardKey.insert, 102 : PhysicalKeyboardKey.home, 104 : PhysicalKeyboardKey.pageUp, 177 : PhysicalKeyboardKey.pageUp, 111 : PhysicalKeyboardKey.delete, 107 : PhysicalKeyboardKey.end, 109 : PhysicalKeyboardKey.pageDown, 178 : PhysicalKeyboardKey.pageDown, 106 : PhysicalKeyboardKey.arrowRight, 105 : PhysicalKeyboardKey.arrowLeft, 108 : PhysicalKeyboardKey.arrowDown, 103 : PhysicalKeyboardKey.arrowUp, 69 : PhysicalKeyboardKey.numLock, 98 : PhysicalKeyboardKey.numpadDivide, 55 : PhysicalKeyboardKey.numpadMultiply, 74 : PhysicalKeyboardKey.numpadSubtract, 78 : PhysicalKeyboardKey.numpadAdd, 96 : PhysicalKeyboardKey.numpadEnter, 79 : PhysicalKeyboardKey.numpad1, 80 : PhysicalKeyboardKey.numpad2, 81 : PhysicalKeyboardKey.numpad3, 75 : PhysicalKeyboardKey.numpad4, 76 : PhysicalKeyboardKey.numpad5, 77 : PhysicalKeyboardKey.numpad6, 71 : PhysicalKeyboardKey.numpad7, 72 : PhysicalKeyboardKey.numpad8, 73 : PhysicalKeyboardKey.numpad9, 82 : PhysicalKeyboardKey.numpad0, 83 : PhysicalKeyboardKey.numpadDecimal, 127 : PhysicalKeyboardKey.contextMenu, 139 : PhysicalKeyboardKey.contextMenu, 116 : PhysicalKeyboardKey.power, 152 : PhysicalKeyboardKey.power, 117 : PhysicalKeyboardKey.numpadEqual, 183 : PhysicalKeyboardKey.f13, 184 : PhysicalKeyboardKey.f14, 185 : PhysicalKeyboardKey.f15, 186 : PhysicalKeyboardKey.f16, 187 : PhysicalKeyboardKey.f17, 188 : PhysicalKeyboardKey.f18, 189 : PhysicalKeyboardKey.f19, 190 : PhysicalKeyboardKey.f20, 191 : PhysicalKeyboardKey.f21, 192 : PhysicalKeyboardKey.f22, 193 : PhysicalKeyboardKey.f23, 194 : PhysicalKeyboardKey.f24, 134 : PhysicalKeyboardKey.open, 138 : PhysicalKeyboardKey.help, 353 : PhysicalKeyboardKey.select, 129 : PhysicalKeyboardKey.again, 131 : PhysicalKeyboardKey.undo, 137 : PhysicalKeyboardKey.cut, 133 : PhysicalKeyboardKey.copy, 135 : PhysicalKeyboardKey.paste, 136 : PhysicalKeyboardKey.find, 113 : PhysicalKeyboardKey.audioVolumeMute, 115 : PhysicalKeyboardKey.audioVolumeUp, 114 : PhysicalKeyboardKey.audioVolumeDown, 95 : PhysicalKeyboardKey.numpadComma, 121 : PhysicalKeyboardKey.numpadComma, 92 : PhysicalKeyboardKey.convert, 94 : PhysicalKeyboardKey.nonConvert, 90 : PhysicalKeyboardKey.lang3, 91 : PhysicalKeyboardKey.lang4, 130 : PhysicalKeyboardKey.props, 179 : PhysicalKeyboardKey.numpadParenLeft, 180 : PhysicalKeyboardKey.numpadParenRight, 29 : PhysicalKeyboardKey.controlLeft, 42 : PhysicalKeyboardKey.shiftLeft, 56 : PhysicalKeyboardKey.altLeft, 125 : PhysicalKeyboardKey.metaLeft, 97 : PhysicalKeyboardKey.controlRight, 54 : PhysicalKeyboardKey.shiftRight, 100 : PhysicalKeyboardKey.altRight, 126 : PhysicalKeyboardKey.metaRight, 358 : PhysicalKeyboardKey.info, 225 : PhysicalKeyboardKey.brightnessUp, 224 : PhysicalKeyboardKey.brightnessDown, 174 : PhysicalKeyboardKey.exit, 402 : PhysicalKeyboardKey.channelUp, 403 : PhysicalKeyboardKey.channelDown, 200 : PhysicalKeyboardKey.mediaPlay, 207 : PhysicalKeyboardKey.mediaPlay, 167 : PhysicalKeyboardKey.mediaRecord, 208 : PhysicalKeyboardKey.mediaFastForward, 168 : PhysicalKeyboardKey.mediaRewind, 163 : PhysicalKeyboardKey.mediaTrackNext, 165 : PhysicalKeyboardKey.mediaTrackPrevious, 128 : PhysicalKeyboardKey.mediaStop, 166 : PhysicalKeyboardKey.mediaStop, 161 : PhysicalKeyboardKey.eject, 162 : PhysicalKeyboardKey.eject, 164 : PhysicalKeyboardKey.mediaPlayPause, 209 : PhysicalKeyboardKey.bassBoost, 155 : PhysicalKeyboardKey.launchMail, 215 : PhysicalKeyboardKey.launchMail, 429 : PhysicalKeyboardKey.launchContacts, 397 : PhysicalKeyboardKey.launchCalendar, 181 : PhysicalKeyboardKey.newKey, 160 : PhysicalKeyboardKey.close, 206 : PhysicalKeyboardKey.close, 210 : PhysicalKeyboardKey.print, 217 : PhysicalKeyboardKey.browserSearch, 159 : PhysicalKeyboardKey.browserForward, 156 : PhysicalKeyboardKey.browserFavorites, 182 : PhysicalKeyboardKey.redo, 256 : PhysicalKeyboardKey.gameButton1, 288 : PhysicalKeyboardKey.gameButton1, 257 : PhysicalKeyboardKey.gameButton2, 289 : PhysicalKeyboardKey.gameButton2, 258 : PhysicalKeyboardKey.gameButton3, 290 : PhysicalKeyboardKey.gameButton3, 259 : PhysicalKeyboardKey.gameButton4, 291 : PhysicalKeyboardKey.gameButton4, 260 : PhysicalKeyboardKey.gameButton5, 292 : PhysicalKeyboardKey.gameButton5, 261 : PhysicalKeyboardKey.gameButton6, 293 : PhysicalKeyboardKey.gameButton6, 262 : PhysicalKeyboardKey.gameButton7, 294 : PhysicalKeyboardKey.gameButton7, 263 : PhysicalKeyboardKey.gameButton8, 295 : PhysicalKeyboardKey.gameButton8, 264 : PhysicalKeyboardKey.gameButton9, 296 : PhysicalKeyboardKey.gameButton9, 265 : PhysicalKeyboardKey.gameButton10, 297 : PhysicalKeyboardKey.gameButton10, 266 : PhysicalKeyboardKey.gameButton11, 298 : PhysicalKeyboardKey.gameButton11, 267 : PhysicalKeyboardKey.gameButton12, 299 : PhysicalKeyboardKey.gameButton12, 268 : PhysicalKeyboardKey.gameButton13, 300 : PhysicalKeyboardKey.gameButton13, 269 : PhysicalKeyboardKey.gameButton14, 301 : PhysicalKeyboardKey.gameButton14, 270 : PhysicalKeyboardKey.gameButton15, 302 : PhysicalKeyboardKey.gameButton15, 271 : PhysicalKeyboardKey.gameButton16, 303 : PhysicalKeyboardKey.gameButton16, 304 : PhysicalKeyboardKey.gameButtonA, 305 : PhysicalKeyboardKey.gameButtonB, 306 : PhysicalKeyboardKey.gameButtonC, 310 : PhysicalKeyboardKey.gameButtonLeft1, 312 : PhysicalKeyboardKey.gameButtonLeft2, 316 : PhysicalKeyboardKey.gameButtonMode, 311 : PhysicalKeyboardKey.gameButtonRight1, 313 : PhysicalKeyboardKey.gameButtonRight2, 314 : PhysicalKeyboardKey.gameButtonSelect, 315 : PhysicalKeyboardKey.gameButtonStart, 317 : PhysicalKeyboardKey.gameButtonThumbLeft, 318 : PhysicalKeyboardKey.gameButtonThumbRight, 307 : PhysicalKeyboardKey.gameButtonX, 308 : PhysicalKeyboardKey.gameButtonY, 309 : PhysicalKeyboardKey.gameButtonZ, 464 : PhysicalKeyboardKey.fn}

Maps Android-specific scan codes to the matching PhysicalKeyboardKey.

Implementation

const Map<int, PhysicalKeyboardKey> kAndroidToPhysicalKey = <int, PhysicalKeyboardKey>{
  205: PhysicalKeyboardKey.suspend,
  142: PhysicalKeyboardKey.sleep,
  143: PhysicalKeyboardKey.wakeUp,
  30: PhysicalKeyboardKey.keyA,
  48: PhysicalKeyboardKey.keyB,
  46: PhysicalKeyboardKey.keyC,
  32: PhysicalKeyboardKey.keyD,
  18: PhysicalKeyboardKey.keyE,
  33: PhysicalKeyboardKey.keyF,
  34: PhysicalKeyboardKey.keyG,
  35: PhysicalKeyboardKey.keyH,
  23: PhysicalKeyboardKey.keyI,
  36: PhysicalKeyboardKey.keyJ,
  37: PhysicalKeyboardKey.keyK,
  38: PhysicalKeyboardKey.keyL,
  50: PhysicalKeyboardKey.keyM,
  49: PhysicalKeyboardKey.keyN,
  24: PhysicalKeyboardKey.keyO,
  25: PhysicalKeyboardKey.keyP,
  16: PhysicalKeyboardKey.keyQ,
  19: PhysicalKeyboardKey.keyR,
  31: PhysicalKeyboardKey.keyS,
  20: PhysicalKeyboardKey.keyT,
  22: PhysicalKeyboardKey.keyU,
  47: PhysicalKeyboardKey.keyV,
  17: PhysicalKeyboardKey.keyW,
  45: PhysicalKeyboardKey.keyX,
  21: PhysicalKeyboardKey.keyY,
  44: PhysicalKeyboardKey.keyZ,
  2: PhysicalKeyboardKey.digit1,
  3: PhysicalKeyboardKey.digit2,
  4: PhysicalKeyboardKey.digit3,
  5: PhysicalKeyboardKey.digit4,
  6: PhysicalKeyboardKey.digit5,
  7: PhysicalKeyboardKey.digit6,
  8: PhysicalKeyboardKey.digit7,
  9: PhysicalKeyboardKey.digit8,
  10: PhysicalKeyboardKey.digit9,
  11: PhysicalKeyboardKey.digit0,
  28: PhysicalKeyboardKey.enter,
  1: PhysicalKeyboardKey.escape,
  14: PhysicalKeyboardKey.backspace,
  15: PhysicalKeyboardKey.tab,
  57: PhysicalKeyboardKey.space,
  12: PhysicalKeyboardKey.minus,
  13: PhysicalKeyboardKey.equal,
  26: PhysicalKeyboardKey.bracketLeft,
  27: PhysicalKeyboardKey.bracketRight,
  43: PhysicalKeyboardKey.backslash,
  86: PhysicalKeyboardKey.backslash,
  39: PhysicalKeyboardKey.semicolon,
  40: PhysicalKeyboardKey.quote,
  41: PhysicalKeyboardKey.backquote,
  51: PhysicalKeyboardKey.comma,
  52: PhysicalKeyboardKey.period,
  53: PhysicalKeyboardKey.slash,
  58: PhysicalKeyboardKey.capsLock,
  59: PhysicalKeyboardKey.f1,
  60: PhysicalKeyboardKey.f2,
  61: PhysicalKeyboardKey.f3,
  62: PhysicalKeyboardKey.f4,
  63: PhysicalKeyboardKey.f5,
  64: PhysicalKeyboardKey.f6,
  65: PhysicalKeyboardKey.f7,
  66: PhysicalKeyboardKey.f8,
  67: PhysicalKeyboardKey.f9,
  68: PhysicalKeyboardKey.f10,
  87: PhysicalKeyboardKey.f11,
  88: PhysicalKeyboardKey.f12,
  99: PhysicalKeyboardKey.printScreen,
  70: PhysicalKeyboardKey.scrollLock,
  119: PhysicalKeyboardKey.pause,
  411: PhysicalKeyboardKey.pause,
  110: PhysicalKeyboardKey.insert,
  102: PhysicalKeyboardKey.home,
  104: PhysicalKeyboardKey.pageUp,
  177: PhysicalKeyboardKey.pageUp,
  111: PhysicalKeyboardKey.delete,
  107: PhysicalKeyboardKey.end,
  109: PhysicalKeyboardKey.pageDown,
  178: PhysicalKeyboardKey.pageDown,
  106: PhysicalKeyboardKey.arrowRight,
  105: PhysicalKeyboardKey.arrowLeft,
  108: PhysicalKeyboardKey.arrowDown,
  103: PhysicalKeyboardKey.arrowUp,
  69: PhysicalKeyboardKey.numLock,
  98: PhysicalKeyboardKey.numpadDivide,
  55: PhysicalKeyboardKey.numpadMultiply,
  74: PhysicalKeyboardKey.numpadSubtract,
  78: PhysicalKeyboardKey.numpadAdd,
  96: PhysicalKeyboardKey.numpadEnter,
  79: PhysicalKeyboardKey.numpad1,
  80: PhysicalKeyboardKey.numpad2,
  81: PhysicalKeyboardKey.numpad3,
  75: PhysicalKeyboardKey.numpad4,
  76: PhysicalKeyboardKey.numpad5,
  77: PhysicalKeyboardKey.numpad6,
  71: PhysicalKeyboardKey.numpad7,
  72: PhysicalKeyboardKey.numpad8,
  73: PhysicalKeyboardKey.numpad9,
  82: PhysicalKeyboardKey.numpad0,
  83: PhysicalKeyboardKey.numpadDecimal,
  127: PhysicalKeyboardKey.contextMenu,
  139: PhysicalKeyboardKey.contextMenu,
  116: PhysicalKeyboardKey.power,
  152: PhysicalKeyboardKey.power,
  117: PhysicalKeyboardKey.numpadEqual,
  183: PhysicalKeyboardKey.f13,
  184: PhysicalKeyboardKey.f14,
  185: PhysicalKeyboardKey.f15,
  186: PhysicalKeyboardKey.f16,
  187: PhysicalKeyboardKey.f17,
  188: PhysicalKeyboardKey.f18,
  189: PhysicalKeyboardKey.f19,
  190: PhysicalKeyboardKey.f20,
  191: PhysicalKeyboardKey.f21,
  192: PhysicalKeyboardKey.f22,
  193: PhysicalKeyboardKey.f23,
  194: PhysicalKeyboardKey.f24,
  134: PhysicalKeyboardKey.open,
  138: PhysicalKeyboardKey.help,
  353: PhysicalKeyboardKey.select,
  129: PhysicalKeyboardKey.again,
  131: PhysicalKeyboardKey.undo,
  137: PhysicalKeyboardKey.cut,
  133: PhysicalKeyboardKey.copy,
  135: PhysicalKeyboardKey.paste,
  136: PhysicalKeyboardKey.find,
  113: PhysicalKeyboardKey.audioVolumeMute,
  115: PhysicalKeyboardKey.audioVolumeUp,
  114: PhysicalKeyboardKey.audioVolumeDown,
  95: PhysicalKeyboardKey.numpadComma,
  121: PhysicalKeyboardKey.numpadComma,
  92: PhysicalKeyboardKey.convert,
  94: PhysicalKeyboardKey.nonConvert,
  90: PhysicalKeyboardKey.lang3,
  91: PhysicalKeyboardKey.lang4,
  130: PhysicalKeyboardKey.props,
  179: PhysicalKeyboardKey.numpadParenLeft,
  180: PhysicalKeyboardKey.numpadParenRight,
  29: PhysicalKeyboardKey.controlLeft,
  42: PhysicalKeyboardKey.shiftLeft,
  56: PhysicalKeyboardKey.altLeft,
  125: PhysicalKeyboardKey.metaLeft,
  97: PhysicalKeyboardKey.controlRight,
  54: PhysicalKeyboardKey.shiftRight,
  100: PhysicalKeyboardKey.altRight,
  126: PhysicalKeyboardKey.metaRight,
  358: PhysicalKeyboardKey.info,
  225: PhysicalKeyboardKey.brightnessUp,
  224: PhysicalKeyboardKey.brightnessDown,
  174: PhysicalKeyboardKey.exit,
  402: PhysicalKeyboardKey.channelUp,
  403: PhysicalKeyboardKey.channelDown,
  200: PhysicalKeyboardKey.mediaPlay,
  207: PhysicalKeyboardKey.mediaPlay,
  167: PhysicalKeyboardKey.mediaRecord,
  208: PhysicalKeyboardKey.mediaFastForward,
  168: PhysicalKeyboardKey.mediaRewind,
  163: PhysicalKeyboardKey.mediaTrackNext,
  165: PhysicalKeyboardKey.mediaTrackPrevious,
  128: PhysicalKeyboardKey.mediaStop,
  166: PhysicalKeyboardKey.mediaStop,
  161: PhysicalKeyboardKey.eject,
  162: PhysicalKeyboardKey.eject,
  164: PhysicalKeyboardKey.mediaPlayPause,
  209: PhysicalKeyboardKey.bassBoost,
  155: PhysicalKeyboardKey.launchMail,
  215: PhysicalKeyboardKey.launchMail,
  429: PhysicalKeyboardKey.launchContacts,
  397: PhysicalKeyboardKey.launchCalendar,
  181: PhysicalKeyboardKey.newKey,
  160: PhysicalKeyboardKey.close,
  206: PhysicalKeyboardKey.close,
  210: PhysicalKeyboardKey.print,
  217: PhysicalKeyboardKey.browserSearch,
  159: PhysicalKeyboardKey.browserForward,
  156: PhysicalKeyboardKey.browserFavorites,
  182: PhysicalKeyboardKey.redo,
  256: PhysicalKeyboardKey.gameButton1,
  288: PhysicalKeyboardKey.gameButton1,
  257: PhysicalKeyboardKey.gameButton2,
  289: PhysicalKeyboardKey.gameButton2,
  258: PhysicalKeyboardKey.gameButton3,
  290: PhysicalKeyboardKey.gameButton3,
  259: PhysicalKeyboardKey.gameButton4,
  291: PhysicalKeyboardKey.gameButton4,
  260: PhysicalKeyboardKey.gameButton5,
  292: PhysicalKeyboardKey.gameButton5,
  261: PhysicalKeyboardKey.gameButton6,
  293: PhysicalKeyboardKey.gameButton6,
  262: PhysicalKeyboardKey.gameButton7,
  294: PhysicalKeyboardKey.gameButton7,
  263: PhysicalKeyboardKey.gameButton8,
  295: PhysicalKeyboardKey.gameButton8,
  264: PhysicalKeyboardKey.gameButton9,
  296: PhysicalKeyboardKey.gameButton9,
  265: PhysicalKeyboardKey.gameButton10,
  297: PhysicalKeyboardKey.gameButton10,
  266: PhysicalKeyboardKey.gameButton11,
  298: PhysicalKeyboardKey.gameButton11,
  267: PhysicalKeyboardKey.gameButton12,
  299: PhysicalKeyboardKey.gameButton12,
  268: PhysicalKeyboardKey.gameButton13,
  300: PhysicalKeyboardKey.gameButton13,
  269: PhysicalKeyboardKey.gameButton14,
  301: PhysicalKeyboardKey.gameButton14,
  270: PhysicalKeyboardKey.gameButton15,
  302: PhysicalKeyboardKey.gameButton15,
  271: PhysicalKeyboardKey.gameButton16,
  303: PhysicalKeyboardKey.gameButton16,
  304: PhysicalKeyboardKey.gameButtonA,
  305: PhysicalKeyboardKey.gameButtonB,
  306: PhysicalKeyboardKey.gameButtonC,
  310: PhysicalKeyboardKey.gameButtonLeft1,
  312: PhysicalKeyboardKey.gameButtonLeft2,
  316: PhysicalKeyboardKey.gameButtonMode,
  311: PhysicalKeyboardKey.gameButtonRight1,
  313: PhysicalKeyboardKey.gameButtonRight2,
  314: PhysicalKeyboardKey.gameButtonSelect,
  315: PhysicalKeyboardKey.gameButtonStart,
  317: PhysicalKeyboardKey.gameButtonThumbLeft,
  318: PhysicalKeyboardKey.gameButtonThumbRight,
  307: PhysicalKeyboardKey.gameButtonX,
  308: PhysicalKeyboardKey.gameButtonY,
  309: PhysicalKeyboardKey.gameButtonZ,
  464: PhysicalKeyboardKey.fn,
}