Using callback functions can be complicated and inflexible. I think the way pc-keybaord does it is much better, where you give it a u8 and it will return an Option with the decoded event. https://docs.rs/pc-keyboard/0.8.0/pc_keyboard/struct.Keyboard.html#method.add_byte
I can make a PR for this.