kMacOsFunctionKeyMap top-level constant

const kMacOsFunctionKeyMap = <int, LogicalKeyboardKey>{122 : LogicalKeyboardKey.f1, 120 : LogicalKeyboardKey.f2, 99 : LogicalKeyboardKey.f3, 118 : LogicalKeyboardKey.f4, 96 : LogicalKeyboardKey.f5, 97 : LogicalKeyboardKey.f6, 98 : LogicalKeyboardKey.f7, 100 : LogicalKeyboardKey.f8, 101 : LogicalKeyboardKey.f9, 109 : LogicalKeyboardKey.f10, 103 : LogicalKeyboardKey.f11, 111 : LogicalKeyboardKey.f12, 105 : LogicalKeyboardKey.f13, 107 : LogicalKeyboardKey.f14, 113 : LogicalKeyboardKey.f15, 106 : LogicalKeyboardKey.f16, 64 : LogicalKeyboardKey.f17, 79 : LogicalKeyboardKey.f18, 80 : LogicalKeyboardKey.f19, 90 : LogicalKeyboardKey.f20}

A map of macOS key codes which are numbered function keys, so that they can be excluded when asking "is the Fn modifier down?".

Implementation

const Map<int, LogicalKeyboardKey> kMacOsFunctionKeyMap = <int, LogicalKeyboardKey>{
  0x0000007a: LogicalKeyboardKey.f1,
  0x00000078: LogicalKeyboardKey.f2,
  0x00000063: LogicalKeyboardKey.f3,
  0x00000076: LogicalKeyboardKey.f4,
  0x00000060: LogicalKeyboardKey.f5,
  0x00000061: LogicalKeyboardKey.f6,
  0x00000062: LogicalKeyboardKey.f7,
  0x00000064: LogicalKeyboardKey.f8,
  0x00000065: LogicalKeyboardKey.f9,
  0x0000006d: LogicalKeyboardKey.f10,
  0x00000067: LogicalKeyboardKey.f11,
  0x0000006f: LogicalKeyboardKey.f12,
  0x00000069: LogicalKeyboardKey.f13,
  0x0000006b: LogicalKeyboardKey.f14,
  0x00000071: LogicalKeyboardKey.f15,
  0x0000006a: LogicalKeyboardKey.f16,
  0x00000040: LogicalKeyboardKey.f17,
  0x0000004f: LogicalKeyboardKey.f18,
  0x00000050: LogicalKeyboardKey.f19,
  0x0000005a: LogicalKeyboardKey.f20,
}