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

Class Sequence

src/handlers/sequence.rs:25–30  ·  view source on GitHub ↗

A sequence is a series of keystrokes (press and release) that upon finish (ie. the release of the last key) sends first a (configurable) number of backspaces (to undo the input) and then an action. sequence keys - even if matching are not handled by Sequence, except if they're from the private range, in which case the Sequence will consume the Events. It is suggested to prefix your sequences wit

Source from the content-addressed store, hash-verified

23/// triggers the prefix sequence, eating the keypress event,
24/// and the second time the longer sequence sees it and advances.
25pub struct Sequence<'a, M> {
26 sequence: &'a [u32],
27 callback: M,
28 backspaces: u8,
29 pos: u8,
30}
31
32impl<'a, M: Action> Sequence<'a, M> {
33 pub fn new(sequence: &'a [u32], callback: M, backspaces: u8) -> Sequence<'a, M> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected