isKeyEqual static method

Implementation

static bool isKeyEqual(LogicalKeyboardKey a, LogicalKeyboardKey b) {
  if (a == ctrlKey && (b == ctrlLeftKey || b == ctrlRightKey)) return true;
  if (a == altKey && (b == altLeftKey || b == altRightKey)) return true;
  if (a == shiftKey && (b == shiftLeftKey || b == shiftRightKey)) return true;

  if (b == ctrlKey && (a == ctrlLeftKey || a == ctrlRightKey)) return true;
  if (b == altKey && (a == altLeftKey || a == altRightKey)) return true;
  if (b == shiftKey && (a == shiftLeftKey || a == shiftRightKey)) return true;

  return a.keyId == b.keyId;
}