[PR #4746] [MERGED] Add warning messages for bad keybindings #25923

Open
opened 2026-01-31 09:12:39 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4746
Author: @zadjii-msft
Created: 2/28/2020
Status: Merged
Merged: 3/5/2020
Merged by: @undefined

Base: masterHead: dev/migrie/b/3522-keybinding-warnings


📝 Commits (7)

  • 759964c Okay this is good to know
  • 1a18ef3 at least this compiles
  • 2e56284 make these lines way cleaner to read
  • 45dc345 Display these two warning cases
  • 7a7b0e5 Add tests, clean up code
  • 6fe006a Merge remote-tracking branch 'origin/master' into dev/migrie/b/3522-keybinding-warnings
  • 9a9d4fb these are some nits for carlos

📊 Changes

11 files changed (+204 additions, -46 deletions)

View changed files

📝 src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp (+46 -0)
📝 src/cascadia/TerminalApp/ActionArgs.h (+31 -14)
📝 src/cascadia/TerminalApp/AppKeyBindings.h (+1 -1)
📝 src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp (+50 -23)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+6 -3)
📝 src/cascadia/TerminalApp/CascadiaSettings.cpp (+23 -1)
📝 src/cascadia/TerminalApp/CascadiaSettings.h (+1 -0)
📝 src/cascadia/TerminalApp/GlobalAppSettings.cpp (+23 -1)
📝 src/cascadia/TerminalApp/GlobalAppSettings.h (+3 -0)
📝 src/cascadia/TerminalApp/Resources/Resources.language-en.resw (+13 -1)
📝 src/cascadia/TerminalApp/TerminalWarnings.h (+7 -2)

📄 Description

Summary of the Pull Request

Adds warning messages for a pair of keybindings-related scenarios. This covers the following two bugs:

  • #4239 - If the user has supplied more than one key chord in their "keys" array.
  • #3522 - If a keybinding has a required argument, then we'll display a message to the user
    • currently, the only required parameter is the direction parameter for both resizePane and moveFocus

References

When we get to #1334, we'll want to remove the TooManyKeysForChord warning.

PR Checklist

image

Validation Steps Performed

Tested manually, added tests.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/4746 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 2/28/2020 **Status:** ✅ Merged **Merged:** 3/5/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/migrie/b/3522-keybinding-warnings` --- ### 📝 Commits (7) - [`759964c`](https://github.com/microsoft/terminal/commit/759964c20c2bfb758b32b11532cb79ef6668ce75) Okay this is good to know - [`1a18ef3`](https://github.com/microsoft/terminal/commit/1a18ef35a7a9d5266e41c643cde29d21fdb87e9f) at least this compiles - [`2e56284`](https://github.com/microsoft/terminal/commit/2e5628467fb686926b490cb960e50aa2ca285402) make these lines way cleaner to read - [`45dc345`](https://github.com/microsoft/terminal/commit/45dc3452b13146d2e92d6c1abf24fbed34267ca1) Display these two warning cases - [`7a7b0e5`](https://github.com/microsoft/terminal/commit/7a7b0e54bfa5993f7b4dc08f55a4e17a5b1bffd6) Add tests, clean up code - [`6fe006a`](https://github.com/microsoft/terminal/commit/6fe006a19c2650d1486a3e593f33c326f5a6472e) Merge remote-tracking branch 'origin/master' into dev/migrie/b/3522-keybinding-warnings - [`9a9d4fb`](https://github.com/microsoft/terminal/commit/9a9d4fb4a3c05ca0be87b9bb2a6b288519c07b5b) these are some nits for carlos ### 📊 Changes **11 files changed** (+204 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp` (+46 -0) 📝 `src/cascadia/TerminalApp/ActionArgs.h` (+31 -14) 📝 `src/cascadia/TerminalApp/AppKeyBindings.h` (+1 -1) 📝 `src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp` (+50 -23) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+6 -3) 📝 `src/cascadia/TerminalApp/CascadiaSettings.cpp` (+23 -1) 📝 `src/cascadia/TerminalApp/CascadiaSettings.h` (+1 -0) 📝 `src/cascadia/TerminalApp/GlobalAppSettings.cpp` (+23 -1) 📝 `src/cascadia/TerminalApp/GlobalAppSettings.h` (+3 -0) 📝 `src/cascadia/TerminalApp/Resources/Resources.language-en.resw` (+13 -1) 📝 `src/cascadia/TerminalApp/TerminalWarnings.h` (+7 -2) </details> ### 📄 Description ## Summary of the Pull Request Adds warning messages for a pair of keybindings-related scenarios. This covers the following two bugs: * #4239 - If the user has supplied more than one key chord in their `"keys"` array. * #3522 - If a keybinding has a _required_ argument, then we'll display a message to the user - currently, the only required parameter is the `direction` parameter for both `resizePane` and `moveFocus` ## References When we get to #1334, we'll want to remove the `TooManyKeysForChord` warning. ## PR Checklist * [x] Closes #4239 * [x] Closes #3522 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ![image](https://user-images.githubusercontent.com/18356694/75593132-f18ec700-5a49-11ea-9d26-6acd0d28b0b7.png) ## Validation Steps Performed Tested manually, added tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:12:39 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25923