A simple callback - call on_press(output: impl USBKeyOut) on key press and on_release(output) on release)) trigger may be any keycode, but consider using the constants in UserKey:: which is not used by either UnicodeKeyboard or UsbKeyboard
| 54 | /// but consider using the constants in UserKey::* |
| 55 | /// which is not used by either UnicodeKeyboard or UsbKeyboard |
| 56 | pub struct PressReleaseMacro<M> { |
| 57 | keycode: u32, |
| 58 | callbacks: M, |
| 59 | } |
| 60 | impl<M: OnOff> PressReleaseMacro<M> { |
| 61 | pub fn new(trigger: impl AcceptsKeycode, callbacks: M) -> PressReleaseMacro<M> { |
| 62 | PressReleaseMacro { |
nothing calls this directly
no outgoing calls
no test coverage detected