egui-bind
Library for showing key and pointer binds

Installation
[dependencies]
egui-bind = "0.5"
Example
#[derive(Default)]
struct ExampleApp {
bind: Option<(KeyOrPointer, Modifiers)>,
count: usize,
}
impl App for ExampleApp {
fn update(&mut self, ctx: &Context, _: &mut Frame) {
Window::new("Example")
.show(ctx, |ui| {
if self.bind.pressed(ui.input()) {
self.count += 1;
}
let assigned = Bind::new("_test", &mut self.bind).show(ui);
if !assigned && self.bind.pressed(ui.input()) {
println!("I was pressed");
}
ui.label(format!("Counter: {}", self.count));
});
}
}