diff --git a/doc/cascadia/profiles.schema.json b/doc/cascadia/profiles.schema.json index e2cf5d71cbb..96e7c6cfce8 100644 --- a/doc/cascadia/profiles.schema.json +++ b/doc/cascadia/profiles.schema.json @@ -4,7 +4,7 @@ "title": "Microsoft's Windows Terminal Settings Profile Schema", "definitions": { "KeyChordSegment": { - "pattern": "^(?:(?:ctrl|alt|shift|win)\\+)*(?:app|backspace|comma|delete|down|end|enter|esc|escape|home|insert|left|menu|minus|pagedown|pageup|period|pgdn|pgup|plus|right|space|tab|up|f(?:1\\d?|2[0-4]?|[3-9])|numpad\\d|numpad_(?:\\d|add|decimal|divide|minus|multiply|period|plus|subtract)|(?:vk|sc)\\((?:[1-9]|1?\\d{2}|2[0-4]\\d|25[0-5])\\)|[^\\s+])(?:\\+(?:ctrl|alt|shift|win))*$", + "pattern": "^(?:(?:ctrl|alt|shift|win)\\+)*(?:app|backspace|browser_(?:back|forward|refresh|stop|search|favorites|home)|comma|delete|down|end|enter|esc|escape|home|insert|left|menu|minus|pagedown|pageup|period|pgdn|pgup|plus|right|space|tab|up|f(?:1\\d?|2[0-4]?|[3-9])|numpad\\d|numpad_(?:\\d|add|decimal|divide|minus|multiply|period|plus|subtract)|(?:vk|sc)\\((?:[1-9]|1?\\d{2}|2[0-4]\\d|25[0-5])\\)|[^\\s+])(?:\\+(?:ctrl|alt|shift|win))*$", "type": "string", "description": "The string should fit the format \"[ctrl+][alt+][shift+][win+]\", where each modifier is optional. KeyName is either any single key character, an explicit virtual key or scan code in the form vk(nnn) and sc(nnn) respectively, or one of the special names listed at https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#accepted-modifiers-and-keys" }, diff --git a/src/cascadia/TerminalSettingsModel/KeyChordSerialization.cpp b/src/cascadia/TerminalSettingsModel/KeyChordSerialization.cpp index 8e0b7162f4f..378f92bde36 100644 --- a/src/cascadia/TerminalSettingsModel/KeyChordSerialization.cpp +++ b/src/cascadia/TerminalSettingsModel/KeyChordSerialization.cpp @@ -78,7 +78,14 @@ constexpr std::wstring_view WIN_KEY{ L"win" }; XX(VK_OEM_PLUS, L"plus") /* '+' any country */ \ XX(VK_OEM_COMMA, L"comma") /* ',' any country */ \ XX(VK_OEM_MINUS, L"minus") /* '-' any country */ \ - XX(VK_OEM_PERIOD, L"period") /* '.' any country */ + XX(VK_OEM_PERIOD, L"period") /* '.' any country */ \ + XX(VK_BROWSER_BACK, L"browser_back") \ + XX(VK_BROWSER_FORWARD, L"browser_forward") \ + XX(VK_BROWSER_REFRESH, L"browser_refresh") \ + XX(VK_BROWSER_STOP, L"browser_stop") \ + XX(VK_BROWSER_SEARCH, L"browser_search") \ + XX(VK_BROWSER_FAVORITES, L"browser_favorites") \ + XX(VK_BROWSER_HOME, L"browser_home") constexpr std::wstring_view vkeyPrefix{ L"vk(" }; constexpr std::wstring_view scanCodePrefix{ L"sc(" };