Skip to content

Commit

Permalink
fixes #776 on imgui-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
sanbox-irl committed Sep 30, 2024
1 parent e915b8a commit aff79bd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,12 @@ impl WinitPlatform {
io.add_key_event(Key::ModSuper, state.super_key());
}
WindowEvent::KeyboardInput { ref event, .. } => {
if let Some(txt) = &event.text {
for ch in txt.chars() {
if ch != '\u{7f}' {
io.add_input_character(ch)
if event.state.is_pressed() {
if let Some(txt) = &event.text {
for ch in txt.chars() {
if ch != '\u{7f}' {
io.add_input_character(ch)
}
}
}
}
Expand Down

0 comments on commit aff79bd

Please sign in to comment.