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

Class LongTap

src/handlers/longtap.rs:16–21  ·  view source on GitHub ↗

Handler that does one thing on a short tab, and another on a long tab with a configurable threshold Action happens on release Note that this is a simple implementation that just considers the time from the last key-event without considering whether that was actually the press of the LongTap key

Source from the content-addressed store, hash-verified

14/// the time from the last key-event without considering
15/// whether that was actually the press of the LongTap key
16pub struct LongTap<M1, M2> {
17 trigger: u32,
18 action_short: M1,
19 action_long: M2,
20 threshold_ms: u16,
21}
22
23impl<M1: Action, M2: Action> LongTap<M1, M2> {
24 pub fn new(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected