Struct i_slint_core::items::KeyboardModifiers
source · #[repr(C)]pub struct KeyboardModifiers {
pub alt: bool,
pub control: bool,
pub shift: bool,
pub meta: bool,
}Expand description
The KeyboardModifiers struct provides booleans to indicate possible modifier keys on a keyboard, such as Shift, Control, etc.
It is provided as part of KeyEvent’s modifiers field.
Keyboard shortcuts on Apple platforms typically use the Command key (⌘), such as Command+C for “Copy”. On other platforms the same shortcut is typically represented using Control+C. To make it easier to develop cross-platform applications, on macOS, Slint maps the Command key to the control modifier, and the Control key to the meta modifier.
On Windows, the Windows key is mapped to the meta modifier.
Fields§
§alt: boolIndicates the Alt key on a keyboard.
control: boolIndicates the Control key on a keyboard, except on macOS, where it is the Command key (⌘).
shift: boolIndicates the Shift key on a keyboard.
meta: boolIndicates the Control key on macos, and the Windows key on Windows.
Trait Implementations§
source§impl Clone for KeyboardModifiers
impl Clone for KeyboardModifiers
source§fn clone(&self) -> KeyboardModifiers
fn clone(&self) -> KeyboardModifiers
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for KeyboardModifiers
impl Debug for KeyboardModifiers
source§impl Default for KeyboardModifiers
impl Default for KeyboardModifiers
source§fn default() -> KeyboardModifiers
fn default() -> KeyboardModifiers
source§impl PartialEq for KeyboardModifiers
impl PartialEq for KeyboardModifiers
source§fn eq(&self, other: &KeyboardModifiers) -> bool
fn eq(&self, other: &KeyboardModifiers) -> bool
self and other values to be equal, and is used
by ==.impl Copy for KeyboardModifiers
impl Eq for KeyboardModifiers
impl StructuralPartialEq for KeyboardModifiers
Auto Trait Implementations§
impl Freeze for KeyboardModifiers
impl RefUnwindSafe for KeyboardModifiers
impl Send for KeyboardModifiers
impl Sync for KeyboardModifiers
impl Unpin for KeyboardModifiers
impl UnwindSafe for KeyboardModifiers
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)