Closed chiehw closed 1 year ago
You have it with <x::KeyPressEvent as base::BaseEvent>::NUMBER
.
While this syntax is impractical, it is not normally not needed as you match events with their types:
fn main() -> xcb::Result<()> {
// ...
loop {
match conn.wait_for_event()? {
xcb::Event::X(x::Event::KeyPress(key_press)) => {
// do stuff
}
xcb::Event::Xkb(xkb::Event::MapNotify(ev)) => {
// do other stuff (pass data to xkbcommon for example)
}
_ => {}
}
}
}
I didn't find XCB_KEY_PRESS. e.g. https://github.com/awesomeWM/awesome/blob/b54e50ad6cfdcd864a21970b31378f7c64adf3f4/root.c#LL301C16-L301C29 , any suggestions?