pub struct DisableKeysByUsageFeature { /* private fields */ }Expand description
Implements the DisableKeysByUsage / 0x4522 feature.
Implementations§
Source§impl DisableKeysByUsageFeature
impl DisableKeysByUsageFeature
Sourcepub async fn get_capabilities(&self) -> Result<u8, Hidpp20Error>
pub async fn get_capabilities(&self) -> Result<u8, Hidpp20Error>
Retrieves the maximum number of usages that can be disabled at once.
Sourcepub async fn disable_keys(&self, usages: &[u8]) -> Result<(), Hidpp20Error>
pub async fn disable_keys(&self, usages: &[u8]) -> Result<(), Hidpp20Error>
Disables the given 8-bit keyboard HID usages.
Disabling is cumulative: these usages are added to the disabled set
rather than replacing it. A usage of 0 is the list terminator and cannot
itself be disabled. More usages than fit in one request are sent over
several requests, which the device still accumulates.
Sourcepub async fn enable_keys(&self, usages: &[u8]) -> Result<(), Hidpp20Error>
pub async fn enable_keys(&self, usages: &[u8]) -> Result<(), Hidpp20Error>
Enables (removes from the disabled set) the given 8-bit keyboard HID
usages.
Enabling a usage that is not disabled is a no-op. A usage of 0
terminates the list.
Sourcepub async fn enable_all_keys(&self) -> Result<(), Hidpp20Error>
pub async fn enable_all_keys(&self) -> Result<(), Hidpp20Error>
Re-enables every keyboard key.
Trait Implementations§
Source§impl Clone for DisableKeysByUsageFeature
impl Clone for DisableKeysByUsageFeature
Source§fn clone(&self) -> DisableKeysByUsageFeature
fn clone(&self) -> DisableKeysByUsageFeature
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 moreSource§impl CreatableFeature for DisableKeysByUsageFeature
impl CreatableFeature for DisableKeysByUsageFeature
Source§const STARTING_VERSION: u8 = 0
const STARTING_VERSION: u8 = 0
The version of the feature the implementation starts to support.
impl Feature for DisableKeysByUsageFeature
Auto Trait Implementations§
impl !RefUnwindSafe for DisableKeysByUsageFeature
impl !UnwindSafe for DisableKeysByUsageFeature
impl Freeze for DisableKeysByUsageFeature
impl Send for DisableKeysByUsageFeature
impl Sync for DisableKeysByUsageFeature
impl Unpin for DisableKeysByUsageFeature
impl UnsafeUnpin for DisableKeysByUsageFeature
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