MCPcopy Create free account
hub / github.com/TyberiusPrime/KeyToKey / Key

Class Key

src/key_stream.rs:3–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1use no_std_compat::prelude::v1::*;
2#[derive(PartialEq, Debug)]
3pub struct Key {
4 pub keycode: u32,
5 pub original_keycode: u32, //used to match key press/release pairs - can we save on this anyhow?
6 pub ms_since_last: u16,
7 pub running_number: u8,
8 pub flag: u8, //Todo: express this better
9 //bit 0 is used by Usbkeyboard to decide whether a KeyPress has ever been sent
10 //(or kept back by a different handler so far)
11 //bit1 is used to protect against double rewrites in Layers
12 //bit2 is used by SpaceCadet.
13}
14impl Key {
15 pub fn new(keycode: u32) -> Key {
16 Key {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected