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

Method new

src/handlers/sequence.rs:33–43  ·  view source on GitHub ↗
(sequence: &'a [u32], callback: M, backspaces: u8)

Source from the content-addressed store, hash-verified

31
32impl<'a, M: Action> Sequence<'a, M> {
33 pub fn new(sequence: &'a [u32], callback: M, backspaces: u8) -> Sequence<'a, M> {
34 if sequence.len() > 254 {
35 panic!("Sequence too long, max 254 key codes");
36 }
37 Sequence {
38 sequence,
39 callback,
40 backspaces,
41 pos: 0,
42 }
43 }
44}
45
46impl<T: USBKeyOut, M: Action> ProcessKeys<T> for Sequence<'_, M> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected