expandSynonyms static method
- Set<
LogicalKeyboardKey> input
Returns the given set with any pseudo-keys expanded into their synonyms.
It is used, for example, to take sets of keys with members like control and shift and convert that set to contain controlLeft, controlRight, shiftLeft, and shiftRight.
Implementation
static Set<LogicalKeyboardKey> expandSynonyms(Set<LogicalKeyboardKey> input) {
return input.expand((LogicalKeyboardKey element) {
return _reverseSynonyms[element] ?? <LogicalKeyboardKey>{element};
}).toSet();
}