Replace "bindings" with "actions" (#7332)
In #6532, we thought it would be a good idea to add "bindings" as an overload for "keybindings", as we were no longer going to use the keybindings array for just keybindings. We were going to add commands. So we started secretly treating `"bindings"` the same as `"keybindings"`. Then, in #7175, we discussed using "actions" as the key for the list of commands/keybindings/global actions, instead of using "bindings". We're going to be using this array as the global list of all actions, so it makes sense to just call it `"actions"`. This PR renames "bindings" to "actions". Fortunately, we never documented the "bindings" overload in the first place, so we can get away with this safely, and preferably before we ship "bindings" for too long. References #6899
This commit is contained in:
parent
4814c4f81d
commit
2c4b868b20
|
@ -2438,7 +2438,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{ "keys": "ctrl+a", "command": { "action": "splitPane", "split": "vertical" } },
|
||||
{ "name": "ctrl+b", "command": { "action": "splitPane", "split": "vertical" } },
|
||||
{ "keys": "ctrl+c", "name": "ctrl+c", "command": { "action": "splitPane", "split": "vertical" } },
|
||||
|
@ -2640,7 +2640,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "iterable command ${profile.name}",
|
||||
"iterateOn": "profiles",
|
||||
|
@ -2771,7 +2771,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"iterateOn": "profiles",
|
||||
"command": { "action": "splitPane", "profile": "${profile.name}" }
|
||||
|
@ -2902,7 +2902,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "iterable command ${profile.name}",
|
||||
"iterateOn": "profiles",
|
||||
|
@ -3039,7 +3039,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "Connect to ssh...",
|
||||
"commands": [
|
||||
|
@ -3142,7 +3142,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "grandparent",
|
||||
"commands": [
|
||||
|
@ -3290,7 +3290,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"iterateOn": "profiles",
|
||||
"name": "${profile.name}...",
|
||||
|
@ -3443,7 +3443,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "New Tab With Profile...",
|
||||
"commands": [
|
||||
|
@ -3551,7 +3551,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "New Pane...",
|
||||
"commands": [
|
||||
|
@ -3714,7 +3714,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
|
@ -3777,7 +3777,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "parent",
|
||||
"commands": [
|
||||
|
@ -3798,7 +3798,7 @@ namespace TerminalAppLocalTests
|
|||
const std::string settings1Json{ R"(
|
||||
{
|
||||
"defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "parent",
|
||||
"commands": null
|
||||
|
@ -3860,7 +3860,7 @@ namespace TerminalAppLocalTests
|
|||
"commandline": "wsl.exe"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "parent",
|
||||
"commands": [
|
||||
|
@ -3881,7 +3881,7 @@ namespace TerminalAppLocalTests
|
|||
const std::string settings1Json{ R"(
|
||||
{
|
||||
"defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
|
||||
"bindings": [
|
||||
"actions": [
|
||||
{
|
||||
"name": "parent",
|
||||
"command": "newTab"
|
||||
|
|
|
@ -16,7 +16,7 @@ using namespace ::Microsoft::Console;
|
|||
using namespace winrt::Microsoft::UI::Xaml::Controls;
|
||||
|
||||
static constexpr std::string_view LegacyKeybindingsKey{ "keybindings" };
|
||||
static constexpr std::string_view BindingsKey{ "bindings" };
|
||||
static constexpr std::string_view ActionsKey{ "actions" };
|
||||
static constexpr std::string_view DefaultProfileKey{ "defaultProfile" };
|
||||
static constexpr std::string_view AlwaysShowTabsKey{ "alwaysShowTabs" };
|
||||
static constexpr std::string_view InitialRowsKey{ "initialRows" };
|
||||
|
@ -202,7 +202,7 @@ void GlobalAppSettings::LayerJson(const Json::Value& json)
|
|||
}
|
||||
};
|
||||
parseBindings(LegacyKeybindingsKey);
|
||||
parseBindings(BindingsKey);
|
||||
parseBindings(ActionsKey);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
"brightWhite": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"keybindings":
|
||||
"actions":
|
||||
[
|
||||
// Application-level Keys
|
||||
{ "command": "closeWindow", "keys": "alt+f4" },
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
"brightWhite": "#EEEEEC"
|
||||
}
|
||||
],
|
||||
"bindings":
|
||||
"actions":
|
||||
[
|
||||
// Application-level Keys
|
||||
{ "command": "closeWindow", "keys": "alt+f4" },
|
||||
|
|
Loading…
Reference in a new issue