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

Class SpaceCadet

src/handlers/spacecadet.rs:37–44  ·  view source on GitHub ↗

SpaceCadet Keys are keys that do one Action on tap, and an OnOff if depressed while the next key is pressed. There is a minimum time the key needs to be depressed, which you can configure with SpaceCadet.minimum_depress_ms (this is to allow fast typing where you actually hit the next key before the previous one has been released. It does happend...) They need to be added before the layer they to

Source from the content-addressed store, hash-verified

35/// otherwise it will only work like a regular modifier with the space
36/// cadet trigger.
37pub struct SpaceCadet<MAction, MOnOff> {
38 trigger: u32,
39 action: MAction,
40 onoff: MOnOff,
41 press_number: u8,
42 state: SpaceCadetState,
43 pub minimum_depress_ms: u16,
44}
45impl<MAction: Action, MOnOff: OnOff> SpaceCadet<MAction, MOnOff> {
46 pub fn new(
47 trigger: impl AcceptsKeycode,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected