MCPcopy Create free account
hub / github.com/emberian/evdev / main

Function main

examples/blink_keyboard_leds.rs:5–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3mod _pick_device;
4
5fn main() {
6 let mut d = _pick_device::pick_device();
7 println!("{d}");
8 println!("Blinking the Keyboard LEDS...");
9 for i in 0..5 {
10 let on = i % 2 != 0;
11 d.send_events(&[
12 *LedEvent::new(LedCode::LED_CAPSL, if on { i32::MAX } else { 0 }),
13 *LedEvent::new(LedCode::LED_NUML, if on { i32::MAX } else { 0 }),
14 *LedEvent::new(LedCode::LED_SCROLLL, if on { i32::MAX } else { 0 }),
15 ])
16 .unwrap();
17 std::thread::sleep(std::time::Duration::from_secs(1));
18 }
19}

Callers

nothing calls this directly

Calls 2

pick_deviceFunction · 0.85
send_eventsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…