Skip to main content

ModifiersExt

Trait ModifiersExt 

Source
pub trait ModifiersExt {
    // Required method
    fn ctrl_or_meta() -> Modifiers;
}
Expand description

Extension trait for Modifiers adding OS-aware helpers.

Required Methods§

Source

fn ctrl_or_meta() -> Modifiers

Returns the platform’s command modifier.

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§