From bc67b40b9b42db98296a5493e396454c7d9312b0 Mon Sep 17 00:00:00 2001 From: StaffEngineer Date: Wed, 6 Dec 2023 14:39:35 +0000 Subject: [PATCH 1/2] release modifier key after keyboard action --- src/ui_plugin/systems/keyboard.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui_plugin/systems/keyboard.rs b/src/ui_plugin/systems/keyboard.rs index 02e0503e..4d2d5689 100644 --- a/src/ui_plugin/systems/keyboard.rs +++ b/src/ui_plugin/systems/keyboard.rs @@ -37,7 +37,7 @@ pub fn keyboard_input_system( mut app_state: ResMut, mut ui_state: ResMut, mut events: EventWriter>, - input: Res>, + mut input: ResMut>, windows: Query<&Window, With>, mut editable_text_query: Query< (&EditableText, &mut CosmicEdit, &mut CosmicEditHistory), @@ -143,6 +143,7 @@ pub fn keyboard_input_system( }, image: None, }); + input.release_all() } else if command && input.just_pressed(KeyCode::R) { events.send(AddRect { node: JsonNode { @@ -161,6 +162,7 @@ pub fn keyboard_input_system( }, image: None, }); + input.release_all() } else if command && input.just_pressed(KeyCode::O) { events.send(AddRect { node: JsonNode { @@ -179,6 +181,7 @@ pub fn keyboard_input_system( }, image: None, }); + input.release_all() } else if input.just_pressed(KeyCode::Delete) { if let Some(id) = ui_state.entity_to_edit { for (entity, node) in velo_node_query.iter() { @@ -187,6 +190,7 @@ pub fn keyboard_input_system( } } } + input.release_all() } else { for (editable_text, mut cosmic_edit, mut cosmit_edit_history) in &mut editable_text_query.iter_mut() From bbc2eec53b288c01f75e1131c9d5dc40cb2fd712 Mon Sep 17 00:00:00 2001 From: StaffEngineer Date: Wed, 6 Dec 2023 14:40:17 +0000 Subject: [PATCH 2/2] bump minor version --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 12a8311b..10db8339 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4107,7 +4107,7 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "velo" -version = "0.9.2" +version = "0.9.3" dependencies = [ "arboard", "async-channel", diff --git a/Cargo.toml b/Cargo.toml index 16e367a9..3ad51fe8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ license = "MIT OR Apache-2.0" description = "App for brainstorming & sharing ideas 🦀 Learning Project" repository = "https://github.com/StaffEngineer/velo.git" readme = "Readme.md" -version = "0.9.2" +version = "0.9.3" edition = "2021" exclude = ["assets/fonts/*", "velo.gif", "velo.png"]