synonyms property

Set<LogicalKeyboardKey> synonyms

Returns a set of pseudo-key synonyms for the given key.

This allows finding the pseudo-keys that also represents a concrete key so that a class with a key map can match pseudo-keys as well as the actual generated keys.

The pseudo-keys returned in the set are typically used to represent keys which appear in multiple places on the keyboard, such as the shift, alt, control, and meta keys. The keys in the returned set won't ever be generated directly, but if a more specific key event is received, then this set can be used to find the more general pseudo-key. For example, if this is a shiftLeft key, this accessor will return the set <LogicalKeyboardKey>{ shift }.


Set<LogicalKeyboardKey> get synonyms {
  final LogicalKeyboardKey result = _synonyms[this];
  return result == null ? <LogicalKeyboardKey>{} : <LogicalKeyboardKey>{result};