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

Function one_shot_shift

src/premade.rs:136–148  ·  view source on GitHub ↗

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

(held_timeout: u16, released_timeout: u16)

Source from the content-addressed store, hash-verified

134///
135/// hint: use before space cadet
136pub fn one_shot_shift(held_timeout: u16, released_timeout: u16) -> Box<OneShot<ActionHandler, ActionNone, ActionNone>> {
137 Box::new(OneShot::new(
138 KeyCode::LShift,
139 KeyCode::RShift,
140 ActionHandler {
141 id: Shift as HandlerID,
142 },
143 ActionNone{},
144 ActionNone{},
145 held_timeout,
146 released_timeout,
147 ))
148}
149
150/// make the ctrl keys behave as a OneShot
151///

Callers 5

test_oneshot_shiftFunction · 0.85
test_oneshot_interactionFunction · 0.85

Calls

no outgoing calls

Tested by 5

test_oneshot_shiftFunction · 0.68
test_oneshot_interactionFunction · 0.68