Repository: microsoft/terminal (language: cpp)

Issue:
[Settings UI] Adding an action with no key chord hits an assert
### Windows Terminal version

main @ 9dca6c2

### Windows build number

doesn't matter

### Other Software

none

### Steps to reproduce

1. Go to Settings > Actions
2. Add a new keybinding with an empty key chord	
3. hit save

### Expected Behavior

We should require a key chord before adding the action.

### Actual Behavior

[Debug mode] hit an assert in `KeyChord`: `assert(_vkey || _scanCode);`
[Otherwise]
- nothing happens
- if you try to add another keybinding like this, it detects a conflict with another action that has that "key chord"


Discussion / hints:
Putting this in 1.15 cause _how did this ever work_. I suppose it was always just the "keybindings" page, not the "actions" page so much. 

Fix patch:
diff --git a/src/cascadia/TerminalSettingsModel/KeyChordSerialization.cpp b/src/cascadia/TerminalSettingsModel/KeyChordSerialization.cpp
index 32681150692..c4a5a0cfec0 100644
--- a/src/cascadia/TerminalSettingsModel/KeyChordSerialization.cpp
+++ b/src/cascadia/TerminalSettingsModel/KeyChordSerialization.cpp
@@ -123,6 +123,11 @@ static int32_t parseNumericCode(const std::wstring_view& str, const std::wstring
 // - a newly constructed KeyChord
 static KeyChord _fromString(std::wstring_view wstr)
 {
+    if (wstr.empty())
+    {
+        return nullptr;
+    }
+
     using nameToVkeyPair = std::pair<std::wstring_view, int32_t>;
     static constinit til::static_map nameToVkey{
     // The above VKEY_NAME_PAIRS macro contains a list of key-binding names for each virtual key.


Test patch: