isActivatedBy method Null safety
- ShortcutActivator activator,
- RawKeyEvent event
Returns true if the event and keyboard state would cause this ShortcutActivator to be activated.
If the keyboard state
isn't supplied, then it defaults to using
RawKeyboard.instance.
Implementation
static bool isActivatedBy(ShortcutActivator activator, RawKeyEvent event) {
return (activator.triggers?.contains(event.logicalKey) ?? true)
&& activator.accepts(event, RawKeyboard.instance);
}