Skip to content

Commit 0e88c87

Browse files
committed
add AltGr to the example
1 parent 103a6f3 commit 0e88c87

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/kbd_ev_print.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ pub fn mod_state_side_agnostic_s(state: &ModifiersState) -> String {
4848
} else {
4949
s.push_str(" ")
5050
};
51+
if state.contains(ModifiersState::ALTGR) {
52+
s.push_str("⎇Gr")
53+
} else {
54+
s.push_str(" ")
55+
};
5156
s
5257
}
5358
// https://docs.rs/winit/latest/winit/event/struct.Modifiers.html
@@ -101,6 +106,7 @@ pub fn mod_state_side_aware_s(mods: &Modifiers) -> String {
101106
} else {
102107
s.push_str(" ")
103108
}
109+
s.push_str(" ");
104110
s
105111
}
106112
// pub struct KeyEvent

0 commit comments

Comments
 (0)