getShortcutForAction method

LogicalKeySet? getShortcutForAction(
  1. String actionId
)

Gets the keyboard shortcut for an action.

Parameters:

  • actionId: The action ID to look up

Returns: The LogicalKeySet for the action, or null if no shortcut exists

Implementation

LogicalKeySet? getShortcutForAction(String actionId) {
  for (final entry in _shortcuts.entries) {
    if (entry.value == actionId) {
      return entry.key;
    }
  }
  return null;
}