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

Function one_shot_ctrl

src/premade.rs:153–165  ·  view source on GitHub ↗

make the ctrl keys behave as a OneShot hint: use before space cadet

(held_timeout: u16, released_timeout: u16)

Source from the content-addressed store, hash-verified

151///
152/// hint: use before space cadet
153pub fn one_shot_ctrl(held_timeout: u16, released_timeout: u16) -> Box<OneShot<ActionHandler, ActionNone, ActionNone>> {
154 Box::new(OneShot::new(
155 KeyCode::LCtrl,
156 KeyCode::RCtrl,
157 ActionHandler {
158 id: Ctrl as HandlerID,
159 },
160 ActionNone{},
161 ActionNone{},
162 held_timeout,
163 released_timeout,
164 ))
165}
166/// make the alt keys behave as a OneShot
167///
168/// hint: use before space cadet

Callers 1

test_oneshot_interactionFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_oneshot_interactionFunction · 0.68