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

Method new

src/handlers/longtap.rs:24–36  ·  view source on GitHub ↗
(
        trigger: impl AcceptsKeycode,
        action_short: M1,
        action_long: M2,
        threshold_ms: u16,
    )

Source from the content-addressed store, hash-verified

22
23impl<M1: Action, M2: Action> LongTap<M1, M2> {
24 pub fn new(
25 trigger: impl AcceptsKeycode,
26 action_short: M1,
27 action_long: M2,
28 threshold_ms: u16,
29 ) -> LongTap<M1, M2> {
30 LongTap {
31 trigger: trigger.to_u32(),
32 action_short,
33 action_long,
34 threshold_ms,
35 }
36 }
37}
38
39impl<T: USBKeyOut, M1: Action, M2: Action> ProcessKeys<T> for LongTap<M1, M2> {

Callers

nothing calls this directly

Calls 1

to_u32Method · 0.80

Tested by

no test coverage detected