generated from ElnuDev/rust-project
parent
31b9a88edb
commit
20e0b8dd08
@ -0,0 +1,28 @@
|
|||||||
|
mod oyayubi;
|
||||||
|
pub use oyayubi::OYAYUBI;
|
||||||
|
|
||||||
|
use std::fmt::{Display, self};
|
||||||
|
|
||||||
|
pub struct Key {
|
||||||
|
pub latin: char,
|
||||||
|
pub normal: char,
|
||||||
|
pub shift: char,
|
||||||
|
pub alt_shift: Option<char>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Display for Key {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
write!(f, "{}", self.latin)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Key {
|
||||||
|
const fn new(latin: char, normal: char, shift: char, alt_shift: Option<char>) -> Self {
|
||||||
|
Self {
|
||||||
|
latin,
|
||||||
|
normal,
|
||||||
|
shift,
|
||||||
|
alt_shift,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 804 B After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in new issue