diff --git a/readme.md b/readme.md index 15ac699c0679c2b6e46f8da6b2d26f2a71bd24fe..4c5c727214407453675be6e856b30cfdb03cfaac 100644 --- a/readme.md +++ b/readme.md @@ -29,8 +29,8 @@ RUSTFLAGS=--cfg=web_sys_unstable_apis cargo r --target wasm32-unknown-unknown -- | bevy | bevy_cosmic_edit | | ------ | ---------------- | -| 0.14.0 | 0.22 - latest | -| 0.13.0 | 0.16 - 0.21 | +| 0.14.0 | 0.21 - latest | +| 0.13.0 | 0.16 - 0.20 | | 0.12.* | 0.15 | | 0.11.* | 0.8 - 0.14 | diff --git a/src/input.rs b/src/input.rs index a303d4764127072687b831e8fa4aef2414dfd76c..5d663abd3b48f4e68038069587704aa6f48b34ab 100644 --- a/src/input.rs +++ b/src/input.rs @@ -496,12 +496,18 @@ pub(crate) fn kb_input_text( && (max_chars.0 == 0 || buffer.get_text().len() < max_chars.0) && matches!(char_ev.state, bevy::input::ButtonState::Pressed) { - if let Key::Character(char) = &char_ev.logical_key { - let b = char.as_bytes(); - for c in b { - let c: char = (*c).into(); - editor.action(&mut font_system.0, Action::Insert(c)); + match &char_ev.logical_key { + Key::Character(char) => { + let b = char.as_bytes(); + for c in b { + let c: char = (*c).into(); + editor.action(&mut font_system.0, Action::Insert(c)); + } + } + Key::Space => { + editor.action(&mut font_system.0, Action::Insert(' ')); } + _ => (), } } }