kMacOsToPhysicalKey top-level constant
Maps macOS-specific key code values representing PhysicalKeyboardKey.
MacOS doesn't provide a scan code, but a virtual keycode to represent a physical key.
Implementation
const Map<int, PhysicalKeyboardKey> kMacOsToPhysicalKey = <int, PhysicalKeyboardKey>{
0x00000000: PhysicalKeyboardKey.keyA,
0x00000001: PhysicalKeyboardKey.keyS,
0x00000002: PhysicalKeyboardKey.keyD,
0x00000003: PhysicalKeyboardKey.keyF,
0x00000004: PhysicalKeyboardKey.keyH,
0x00000005: PhysicalKeyboardKey.keyG,
0x00000006: PhysicalKeyboardKey.keyZ,
0x00000007: PhysicalKeyboardKey.keyX,
0x00000008: PhysicalKeyboardKey.keyC,
0x00000009: PhysicalKeyboardKey.keyV,
0x0000000a: PhysicalKeyboardKey.intlBackslash,
0x0000000b: PhysicalKeyboardKey.keyB,
0x0000000c: PhysicalKeyboardKey.keyQ,
0x0000000d: PhysicalKeyboardKey.keyW,
0x0000000e: PhysicalKeyboardKey.keyE,
0x0000000f: PhysicalKeyboardKey.keyR,
0x00000010: PhysicalKeyboardKey.keyY,
0x00000011: PhysicalKeyboardKey.keyT,
0x00000012: PhysicalKeyboardKey.digit1,
0x00000013: PhysicalKeyboardKey.digit2,
0x00000014: PhysicalKeyboardKey.digit3,
0x00000015: PhysicalKeyboardKey.digit4,
0x00000016: PhysicalKeyboardKey.digit6,
0x00000017: PhysicalKeyboardKey.digit5,
0x00000018: PhysicalKeyboardKey.equal,
0x00000019: PhysicalKeyboardKey.digit9,
0x0000001a: PhysicalKeyboardKey.digit7,
0x0000001b: PhysicalKeyboardKey.minus,
0x0000001c: PhysicalKeyboardKey.digit8,
0x0000001d: PhysicalKeyboardKey.digit0,
0x0000001e: PhysicalKeyboardKey.bracketRight,
0x0000001f: PhysicalKeyboardKey.keyO,
0x00000020: PhysicalKeyboardKey.keyU,
0x00000021: PhysicalKeyboardKey.bracketLeft,
0x00000022: PhysicalKeyboardKey.keyI,
0x00000023: PhysicalKeyboardKey.keyP,
0x00000024: PhysicalKeyboardKey.enter,
0x00000025: PhysicalKeyboardKey.keyL,
0x00000026: PhysicalKeyboardKey.keyJ,
0x00000027: PhysicalKeyboardKey.quote,
0x00000028: PhysicalKeyboardKey.keyK,
0x00000029: PhysicalKeyboardKey.semicolon,
0x0000002a: PhysicalKeyboardKey.backslash,
0x0000002b: PhysicalKeyboardKey.comma,
0x0000002c: PhysicalKeyboardKey.slash,
0x0000002d: PhysicalKeyboardKey.keyN,
0x0000002e: PhysicalKeyboardKey.keyM,
0x0000002f: PhysicalKeyboardKey.period,
0x00000030: PhysicalKeyboardKey.tab,
0x00000031: PhysicalKeyboardKey.space,
0x00000032: PhysicalKeyboardKey.backquote,
0x00000033: PhysicalKeyboardKey.backspace,
0x00000035: PhysicalKeyboardKey.escape,
0x00000036: PhysicalKeyboardKey.metaRight,
0x00000037: PhysicalKeyboardKey.metaLeft,
0x00000038: PhysicalKeyboardKey.shiftLeft,
0x00000039: PhysicalKeyboardKey.capsLock,
0x0000003a: PhysicalKeyboardKey.altLeft,
0x0000003b: PhysicalKeyboardKey.controlLeft,
0x0000003c: PhysicalKeyboardKey.shiftRight,
0x0000003d: PhysicalKeyboardKey.altRight,
0x0000003e: PhysicalKeyboardKey.controlRight,
0x0000003f: PhysicalKeyboardKey.fn,
0x00000040: PhysicalKeyboardKey.f17,
0x00000041: PhysicalKeyboardKey.numpadDecimal,
0x00000043: PhysicalKeyboardKey.numpadMultiply,
0x00000045: PhysicalKeyboardKey.numpadAdd,
0x00000047: PhysicalKeyboardKey.numLock,
0x00000048: PhysicalKeyboardKey.audioVolumeUp,
0x00000049: PhysicalKeyboardKey.audioVolumeDown,
0x0000004a: PhysicalKeyboardKey.audioVolumeMute,
0x0000004b: PhysicalKeyboardKey.numpadDivide,
0x0000004c: PhysicalKeyboardKey.numpadEnter,
0x0000004e: PhysicalKeyboardKey.numpadSubtract,
0x0000004f: PhysicalKeyboardKey.f18,
0x00000050: PhysicalKeyboardKey.f19,
0x00000051: PhysicalKeyboardKey.numpadEqual,
0x00000052: PhysicalKeyboardKey.numpad0,
0x00000053: PhysicalKeyboardKey.numpad1,
0x00000054: PhysicalKeyboardKey.numpad2,
0x00000055: PhysicalKeyboardKey.numpad3,
0x00000056: PhysicalKeyboardKey.numpad4,
0x00000057: PhysicalKeyboardKey.numpad5,
0x00000058: PhysicalKeyboardKey.numpad6,
0x00000059: PhysicalKeyboardKey.numpad7,
0x0000005a: PhysicalKeyboardKey.f20,
0x0000005b: PhysicalKeyboardKey.numpad8,
0x0000005c: PhysicalKeyboardKey.numpad9,
0x0000005d: PhysicalKeyboardKey.intlYen,
0x0000005e: PhysicalKeyboardKey.intlRo,
0x0000005f: PhysicalKeyboardKey.numpadComma,
0x00000060: PhysicalKeyboardKey.f5,
0x00000061: PhysicalKeyboardKey.f6,
0x00000062: PhysicalKeyboardKey.f7,
0x00000063: PhysicalKeyboardKey.f3,
0x00000064: PhysicalKeyboardKey.f8,
0x00000065: PhysicalKeyboardKey.f9,
0x00000066: PhysicalKeyboardKey.lang2,
0x00000067: PhysicalKeyboardKey.f11,
0x00000068: PhysicalKeyboardKey.lang1,
0x00000069: PhysicalKeyboardKey.f13,
0x0000006a: PhysicalKeyboardKey.f16,
0x0000006b: PhysicalKeyboardKey.f14,
0x0000006d: PhysicalKeyboardKey.f10,
0x0000006e: PhysicalKeyboardKey.contextMenu,
0x0000006f: PhysicalKeyboardKey.f12,
0x00000071: PhysicalKeyboardKey.f15,
0x00000072: PhysicalKeyboardKey.insert,
0x00000073: PhysicalKeyboardKey.home,
0x00000074: PhysicalKeyboardKey.pageUp,
0x00000075: PhysicalKeyboardKey.delete,
0x00000076: PhysicalKeyboardKey.f4,
0x00000077: PhysicalKeyboardKey.end,
0x00000078: PhysicalKeyboardKey.f2,
0x00000079: PhysicalKeyboardKey.pageDown,
0x0000007a: PhysicalKeyboardKey.f1,
0x0000007b: PhysicalKeyboardKey.arrowLeft,
0x0000007c: PhysicalKeyboardKey.arrowRight,
0x0000007d: PhysicalKeyboardKey.arrowDown,
0x0000007e: PhysicalKeyboardKey.arrowUp,
};