windows: fix 'space' keystroke keydown event (#9476)

Ezekiel Warren created

the space key was being reported as key " " which didn't allow it to be
used in keybindings

Release Notes:

- N/A

Change summary

crates/gpui/src/platform/windows/window.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Detailed changes

crates/gpui/src/platform/windows/window.rs 🔗

@@ -484,9 +484,13 @@ impl WindowsWindowInner {
             if first_char.to_lowercase().to_string() == first_char.to_uppercase().to_string() {
                 modifiers.shift = false;
             }
+            let key = match first_char {
+                ' ' => "space".to_string(),
+                first_char => first_char.to_lowercase().to_string(),
+            };
             Some(Keystroke {
                 modifiers,
-                key: first_char.to_lowercase().to_string(),
+                key,
                 ime_key: Some(first_char.to_string()),
             })
         }