fromLogicalKey static method
Implementation
static KeyModifier? fromLogicalKey(LogicalKeyboardKey logicalKey) {
List<int> logicalKeyIdList = [];
for (List<LogicalKeyboardKey> item in _knownLogicalKeys.values) {
logicalKeyIdList.addAll(item.map((e) => e.keyId).toList());
}
if (!logicalKeyIdList.contains(logicalKey.keyId)) return null;
return _knownLogicalKeys.entries
.firstWhere((entry) =>
entry.value.map((e) => e.keyId).contains(logicalKey.keyId))
.key;
}