[PR #4714] [MERGED] Accept String value for Keybindings's Keys #25892

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4714
Author: @carlos-zamora
Created: 2/25/2020
Status: Merged
Merged: 2/27/2020
Merged by: @undefined

Base: masterHead: dev/cazamor/accept-string-keybinding


📝 Commits (5)

📊 Changes

5 files changed (+114 additions, -60 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+16 -6)
📝 doc/user-docs/UsingJsonSettings.md (+19 -2)
📝 src/cascadia/LocalTests_TerminalApp/KeyBindingsTests.cpp (+25 -0)
📝 src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp (+4 -2)
📝 src/cascadia/TerminalApp/defaults.json (+50 -50)

📄 Description

Summary of the Pull Request

keys in keybindings now accepts a string value. This assumes that you wanted a keychord of size 1. The schema and user docs were properly updated too.

This means that the following keybinding is now accepted in your profiles.json:

{ "command": "copy", "keys": "ctrl+c" }

as opposed to...

{ "command": "copy", "keys": [ "ctrl+c" ] }

PR Checklist

Validation Steps Performed

  • tested the new schema
  • added test

🔄 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/4714 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 2/25/2020 **Status:** ✅ Merged **Merged:** 2/27/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/cazamor/accept-string-keybinding` --- ### 📝 Commits (5) - [`d4ef1cb`](https://github.com/microsoft/terminal/commit/d4ef1cb5065f8565a409546a0473cce047d351c0) Accept keybindings.keys string - [`372270a`](https://github.com/microsoft/terminal/commit/372270a2f25489eb71845bd10df4b7c70125737c) add test - [`5748502`](https://github.com/microsoft/terminal/commit/5748502358a9866cffc218449a47cc72632887da) code format - [`968b20d`](https://github.com/microsoft/terminal/commit/968b20d05a9e859d05dcd0e0eebe78f567e0b65d) split if-statement for clarity and functionality - [`83d2b2c`](https://github.com/microsoft/terminal/commit/83d2b2c2e93cc1a673aa06cd53f41bd52138f90f) update defaults.json & docs ### 📊 Changes **5 files changed** (+114 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+16 -6) 📝 `doc/user-docs/UsingJsonSettings.md` (+19 -2) 📝 `src/cascadia/LocalTests_TerminalApp/KeyBindingsTests.cpp` (+25 -0) 📝 `src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp` (+4 -2) 📝 `src/cascadia/TerminalApp/defaults.json` (+50 -50) </details> ### 📄 Description ## Summary of the Pull Request `keys` in `keybindings` now accepts a string value. This assumes that you wanted a keychord of size 1. The schema and user docs were properly updated too. This means that the following keybinding is now accepted in your profiles.json: ```json { "command": "copy", "keys": "ctrl+c" } ``` as opposed to... ```json { "command": "copy", "keys": [ "ctrl+c" ] } ``` ## PR Checklist * [X] Closes #4713 * [X] CLA signed. * [X] Tests added/passed * [X] Requires documentation to be updated ## Validation Steps Performed - [X] tested the new schema - [X] added test --- <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:29 +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#25892