pub enum KeyboardLockMode {
NumLock,
ScrollLock,
CapsLock,
}Expand description
Represents a lock mode of a keyboard, such as KeyboardLockMode::CapsLock.
A lock mode locks some of a keyboard’s keys into a distinct mode of operation,
depending on the lock settings selected. The status of the mode is toggled
with each key down of its corresponding logical key. A KeyboardLockMode
object is used to query whether this mode is enabled on the keyboard.
Only a limited number of modes are supported, which are enumerated as members of this enum. Manual constructing of this type is prohibited.
Variants§
NumLock
Represents the number lock mode on the keyboard.
On supporting systems, enabling number lock mode usually allows key presses of the number pad to input numbers, instead of acting as up, down, left, right, page up, end, etc.
ScrollLock
Represents the scrolling lock mode on the keyboard.
On supporting systems and applications (such as a spreadsheet), enabling scrolling lock mode usually allows key presses of the cursor keys to scroll the document instead of the cursor.
CapsLock
Represents the capital letters lock mode on the keyboard.
On supporting systems, enabling capital lock mode allows key presses of the letter keys to input uppercase letters instead of lowercase.
Implementations§
Source§impl KeyboardLockMode
impl KeyboardLockMode
Sourcepub fn logical_key(&self) -> LogicalKeyboardKey
pub fn logical_key(&self) -> LogicalKeyboardKey
The logical key that triggers this lock mode.
Sourcepub fn find_lock_by_logical_key(
logical_key: LogicalKeyboardKey,
) -> Option<KeyboardLockMode>
pub fn find_lock_by_logical_key( logical_key: LogicalKeyboardKey, ) -> Option<KeyboardLockMode>
Returns the KeyboardLockMode constant from the logical key, or
None, if not found.
Trait Implementations§
Source§impl Clone for KeyboardLockMode
impl Clone for KeyboardLockMode
impl Copy for KeyboardLockMode
Source§impl Debug for KeyboardLockMode
impl Debug for KeyboardLockMode
impl Eq for KeyboardLockMode
Source§impl Hash for KeyboardLockMode
impl Hash for KeyboardLockMode
Source§impl PartialEq for KeyboardLockMode
impl PartialEq for KeyboardLockMode
impl StructuralPartialEq for KeyboardLockMode
Auto Trait Implementations§
impl Freeze for KeyboardLockMode
impl RefUnwindSafe for KeyboardLockMode
impl Send for KeyboardLockMode
impl Sync for KeyboardLockMode
impl Unpin for KeyboardLockMode
impl UnsafeUnpin for KeyboardLockMode
impl UnwindSafe for KeyboardLockMode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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
key and return true if they are equal.