pub trait IcedModifiersExt: Sealed {
// Required method
fn to_modifiers(&self) -> Vec<Modifier>;
}Expand description
Convert iced Modifiers bitflags to a sorted Vec<Modifier>.
Iced uses LOGO for the Super/Meta/Windows key. This maps to
Modifier::Super in kbd.
This trait is sealed and cannot be implemented outside this crate.
Required Methods§
Sourcefn to_modifiers(&self) -> Vec<Modifier>
fn to_modifiers(&self) -> Vec<Modifier>
Convert these iced modifier flags to a Vec<Modifier>.
§Examples
use iced_core::keyboard::Modifiers;
use kbd::prelude::*;
use kbd_iced::IcedModifiersExt;
let mods = (Modifiers::CTRL | Modifiers::SHIFT).to_modifiers();
assert_eq!(mods, vec![Modifier::Ctrl, Modifier::Shift]);