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

Function one_shot_gui

src/premade.rs:185–197  ·  view source on GitHub ↗

make the gui/windows key behave as a OneShot hint: use before space cadet

(held_timeout: u16, released_timeout: u16)

Source from the content-addressed store, hash-verified

183///
184/// hint: use before space cadet
185pub fn one_shot_gui(held_timeout: u16, released_timeout: u16) -> Box<OneShot<ActionHandler, ActionNone, ActionNone>> {
186 Box::new(OneShot::new(
187 KeyCode::LGui,
188 KeyCode::RGui,
189 ActionHandler {
190 id: Gui as HandlerID,
191 },
192 ActionNone{},
193 ActionNone{},
194 held_timeout,
195 released_timeout,
196 ))
197}
198/// Toggle a handler (layer) based on OneShot behaviour
199pub fn one_shot_handler(
200 trigger: impl AcceptsKeycode,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected