-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Description
Hello,
I would like to add the display trait to the Key enum. The way i picture this working is that all keys would display the same as they do in Debug, except the Key* variants would print without the Key prefix, the Num* variants would print without the Num prefix, and the punctuation characters (- = [ ] \ ; ' , . / ) would print literal punctuation characters. The keypad variants would remain the same, to distinguish them from from the regular number variants.
Ex:
use rdev::Key::*;
fn main() {
println!("{} / {} / {} / {} / {} / {} / {}", Alt, F1, Num1, Minus, KeyQ, LeftBracket, Kp6)
}would print:
Alt / F1 / 1 / - / Q / [ / Kp6
I can implement this and submit a PR if you'd like
Metadata
Metadata
Assignees
Labels
No labels