commandByShortcut method
Resolves a command bound to a command-level shortcut key.
Implementation
@override
PluginCommandRef? commandByShortcut(String shortcut, Device? device) {
final key = shortcut.toLowerCase();
for (final plugin in _plugins) {
for (final command in plugin.commandsFor(device)) {
if (command.shortcut == key) {
return PluginCommandRef(plugin: plugin, command: command);
}
}
}
return null;
}