chordExactlyMatches function

bool chordExactlyMatches(
  1. List<ParsedKeystroke> chord,
  2. ParsedBinding binding
)

Check if a full chord matches a binding's chord exactly.

Implementation

bool chordExactlyMatches(List<ParsedKeystroke> chord, ParsedBinding binding) {
  if (chord.length != binding.chord.length) return false;
  for (var i = 0; i < chord.length; i++) {
    if (!keystrokesEqual(chord[i], binding.chord[i])) return false;
  }
  return true;
}