Skip to main content

KeyboardEventModifiers

Trait KeyboardEventModifiers 

Source
pub trait KeyboardEventModifiers {
    // Required methods
    fn key(&self) -> &str;
    fn code(&self) -> &str;
    fn alt_key(&self) -> bool;
    fn ctrl_key(&self) -> bool;
    fn meta_key(&self) -> bool;
    fn shift_key(&self) -> bool;
}
Expand description

KeyboardEventModifiers: a KeyboardEvent, or anything with its key, code and modifier fields.

Required Methods§

Source

fn key(&self) -> &str

Source

fn code(&self) -> &str

Source

fn alt_key(&self) -> bool

Source

fn ctrl_key(&self) -> bool

Source

fn meta_key(&self) -> bool

Source

fn shift_key(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§