pub enum KeyboardMode {
None,
OnDemand,
Exclusive,
}Expand description
How much of the keyboard a surface needs.
The distinction matters because it decides who receives a keystroke before any click. A panel with a text
field can wait to be clicked into (OnDemand); a launcher cannot — it opens on a keybind
and the next keystroke is already its first search character, so it has to hold the keyboard from the moment
it maps (Exclusive). Asking for more than is needed is not free: a surface holding the
keyboard takes it from the focused window.
Variants§
None
Display-only; never takes keyboard focus.
OnDemand
May be given focus on interaction, e.g. a click into a text field.
Exclusive
Holds the keyboard for as long as it is mapped.
Trait Implementations§
Source§impl Clone for KeyboardMode
impl Clone for KeyboardMode
Source§fn clone(&self) -> KeyboardMode
fn clone(&self) -> KeyboardMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KeyboardMode
Source§impl Debug for KeyboardMode
impl Debug for KeyboardMode
Source§impl Default for KeyboardMode
impl Default for KeyboardMode
Source§fn default() -> KeyboardMode
fn default() -> KeyboardMode
Returns the “default value” for a type. Read more
impl Eq for KeyboardMode
Source§impl PartialEq for KeyboardMode
impl PartialEq for KeyboardMode
impl StructuralPartialEq for KeyboardMode
Auto Trait Implementations§
impl Freeze for KeyboardMode
impl RefUnwindSafe for KeyboardMode
impl Send for KeyboardMode
impl Sync for KeyboardMode
impl Unpin for KeyboardMode
impl UnsafeUnpin for KeyboardMode
impl UnwindSafe for KeyboardMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.