RKTK API Docs RKTK Home Repo

rktk/drivers/interface/
keyscan.rs

1pub use rktk_keymanager::interface::state::input_event::KeyChangeEvent;
2
3/// Key scanner driver interface.
4///
5/// The keyscan driver has two roles:
6/// - Scanning the keys
7/// - Determining which hand is currently using the keyboard on a split keyboard
8///
9/// This is because the key scanning circuit often includes a left/right determination circuit.
10pub trait KeyscanDriver {
11    /// Scans a key and returns the delta from the previous key scan
12    async fn scan(&mut self, callback: impl FnMut(KeyChangeEvent));
13}