isPrefixOf method

bool isPrefixOf(
  1. KeySequence other
)

Whether every step of this sequence is a prefix of other — used to warn about remap conflicts where one binding delays another (e.g. g delays g g).

Implementation

bool isPrefixOf(KeySequence other) {
  if (stepCount > other.stepCount) return false;
  for (var index = 0; index < stepCount; index++) {
    if (_stepAt(index) != other._stepAt(index)) return false;
  }
  return true;
}