key_pressed!() and key_released!() pattern macros #5570
barries
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Rather than spell out the patterns necessary to match key presses, I threw together the below proc macros, which was fun. Is there a better way?
Usage:
Another code snippet, showing how the macro patterns compose as expected:
key_macros.rs:
Beta Was this translation helpful? Give feedback.
All reactions