RKTK API Docs RKTK Home Repo

Trait KeyscanDriver

Source
pub trait KeyscanDriver {
    // Required method
    async fn scan(&mut self, callback: impl FnMut(KeyChangeEvent));
}
Expand description

Key scanner driver interface.

The keyscan driver has two roles:

  • Scanning the keys
  • Determining which hand is currently using the keyboard on a split keyboard

This is because the key scanning circuit often includes a left/right determination circuit.

Required Methods§

Source

async fn scan(&mut self, callback: impl FnMut(KeyChangeEvent))

Scans a key and returns the delta from the previous key scan

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§