pub struct Modifiers {
pub ctrl: bool,
pub alt: bool,
pub shift: bool,
pub cmd: bool,
pub alt_graph: bool,
}Expand description
The modifiers of a keystroke.
Fields§
§ctrl: boolControl.
alt: boolOption on Apple platforms, Alt elsewhere.
shift: boolShift.
cmd: boolCommand on Apple platforms; the Super (Windows) key elsewhere.
alt_graph: boolAltGr (the DOM’s getModifierState("AltGraph")): the key’s
character came from the layout’s AltGr level, so Control and Alt are
held to type text rather than for a shortcut. Only key events set
it; shortcuts never name or match it.
Trait Implementations§
impl Copy for Modifiers
impl Eq for Modifiers
Source§impl JsValue for Modifiers
The modifier keys held: TS’s Modifiers ({ control, alt, shift, platform, altGraph }, GPUI’s names), as press events carry them. A missing key
is not held.
impl JsValue for Modifiers
The modifier keys held: TS’s Modifiers ({ control, alt, shift, platform, altGraph }, GPUI’s names), as press events carry them. A missing key
is not held.
impl StructuralPartialEq for Modifiers
Auto Trait Implementations§
impl Forget for Modifiers
impl Freeze for Modifiers
impl Move for Modifiers
impl RefUnwindSafe for Modifiers
impl Send for Modifiers
impl Sync for Modifiers
impl Unpin for Modifiers
impl UnsafeUnpin for Modifiers
impl UnwindSafe for Modifiers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CallbackArgs for Twhere
T: Ret,
impl<T> CallbackArgs for Twhere
T: Ret,
Source§fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
Its TypeScript parameters, named
names (name: string, amount: number), or without names value for one and a, b, … for
several.Source§fn into_js_args<'a>(
self,
host: &'a dyn JsHost,
) -> Result<Vec<JsOwned<'a>>, PropError>
fn into_js_args<'a>( self, host: &'a dyn JsHost, ) -> Result<Vec<JsOwned<'a>>, PropError>
The arguments as JS values.