stickup 0.2.9

A modular input device abstraction layer with HID and virtual device support.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! src/devices/logger.rs
use crate::devices::event::InputEvent;
use crate::devices::eventbus::InputListener;

/// A simple listener that logs all input events to stdout.
pub struct Logger;

impl Logger {
    pub fn new() -> Self {
        Logger
    }
}

impl InputListener for Logger {
    fn on_input(&mut self, event: &InputEvent) {
        println!("[Input] {:?}", event);
    }
}