Skip to main content

shortcut

Function shortcut 

Source
pub fn shortcut(action: &dyn Action, window: &Window) -> Option<SharedString>
Expand description

The chord bound to action for whatever holds focus right now, formatted for the platform.

The right question for a control that sits with the surface the binding belongs to — a formatting bar above a focused editor, a button in the panel it acts on. None when nothing is bound, or when what is focused is out of the binding’s context.