pub trait ModifiersExt {
// Required method
fn ctrl_or_meta(&self) -> bool;
}Expand description
Extension trait for Modifiers adding OS-aware helpers.
Required Methods§
Sourcefn ctrl_or_meta(&self) -> bool
fn ctrl_or_meta(&self) -> bool
Returns true if the platform’s command modifier is pressed.
Maps to Modifiers::META (Command) on macOS and to Modifiers::CONTROL
on every other platform. Useful to express shortcuts like copy, paste or
select-all once and have them work natively on every OS.