Settings validation error for key bindings with more than one modifier #9495

Closed
opened 2026-01-31 01:55:55 +00:00 by claunia · 8 comments
Owner

Originally created by @Forinil on GitHub (Jul 8, 2020).

Environment

Windows build number: 10.0.19041.0
Windows Terminal version (if applicable): 1.0.1811.0

Any other software?
multipass: 1.3.0+win (installed via Chocolatey)

Steps to reproduce

Install Windows Terminal.
Define keybindings in settings.json with more than one modifier (eg. alt+shift+d)
Install multipass
Run any multipass command in either cmd or powershell or pwsh either within or without Windows Terminal.

Expected behavior

Multipass command completes successfully. Nothing else happens.

Actual behavior

Multipass command seems to complete successfully. Windows Terminal settings parsing error shows up.

image

Additional info

I verified my settings.json file using this schema and this website: https://www.jsonschemavalidator.net and it complains that all keybindings that have more than one modifier are incorrect, because they o not match the regexp pattern defined in https://github.com/microsoft/terminal/blob/master/doc/cascadia/profiles.schema.json#/definitions/KeyChordSegment/pattern.

Keybindings work fine, despite validation errors.

My questions

Why does multipass verify Windows Terminal settings?
Why do keybindings with more than one modifier not satisfy the regular expression?

Originally created by @Forinil on GitHub (Jul 8, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.19041.0 Windows Terminal version (if applicable): 1.0.1811.0 Any other software? multipass: 1.3.0+win (installed via Chocolatey) ``` # Steps to reproduce Install Windows Terminal. Define keybindings in settings.json with more than one modifier (eg. `alt+shift+d`) Install multipass Run any multipass command in either cmd or powershell or pwsh either within or without Windows Terminal. # Expected behavior Multipass command completes successfully. Nothing else happens. # Actual behavior Multipass command seems to complete successfully. Windows Terminal settings parsing error shows up. ![image](https://user-images.githubusercontent.com/22886482/86897518-ca3abb80-c107-11ea-97e2-aa94cf69561a.png) # Additional info I verified my `settings.json` file using this [schema](https://raw.githubusercontent.com/microsoft/terminal/release-1.0/doc/cascadia/profiles.schema.json) and this website: [https://www.jsonschemavalidator.net](https://www.jsonschemavalidator.net) and it complains that all keybindings that have more than one modifier are incorrect, because they o not match the regexp pattern defined in `https://github.com/microsoft/terminal/blob/master/doc/cascadia/profiles.schema.json#/definitions/KeyChordSegment/pattern`. Keybindings work fine, despite validation errors. # My questions Why does multipass verify Windows Terminal settings? Why do keybindings with more than one modifier not satisfy the regular expression?
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 01:55:56 +00:00
Author
Owner

@Forinil commented on GitHub (Jul 8, 2020):

Multipass error is most likely related to functionality mentioned here: https://github.com/canonical/multipass/issues/1585.

After I disabled multipass and Windows Terminal integration the error message disappeared, but it still does not explain the underlying issue with working keybindings supposedly being invalid.

@Forinil commented on GitHub (Jul 8, 2020): Multipass error is most likely related to functionality mentioned here: [https://github.com/canonical/multipass/issues/1585](https://github.com/canonical/multipass/issues/1585). After I disabled multipass and Windows Terminal integration the error message disappeared, but it still does not explain the underlying issue with working keybindings supposedly being invalid.
Author
Owner

@Saviq commented on GitHub (Jul 8, 2020):

Hi @Forinil could you please post an excerpt of your settings.json that exposes this behaviour?

Why does multipass verify Windows Terminal settings?

The file needs to be a valid JSON, is all… so we can safely add the Multipass profile in there without breaking it. We're using the same parser that Windows Terminal uses (jsoncpp so we can be 100% compatible, but apparently we're still not?

@Saviq commented on GitHub (Jul 8, 2020): Hi @Forinil could you please post an excerpt of your `settings.json` that exposes this behaviour? > Why does multipass verify Windows Terminal settings? The file needs to be a valid JSON, is all… so we can safely add the Multipass profile in there without breaking it. We're using the same parser that Windows Terminal uses ([jsoncpp](http://open-source-parsers.github.io/jsoncpp-docs/doxygen/) so we can be 100% compatible, but apparently we're still not?
Author
Owner

@Forinil commented on GitHub (Jul 8, 2020):

@Saviq Here it is: settings.zip

AS fasr as I can tell it's valid JSON, it just fails schema validation for some reason, even though it conforms with the documentation.

@Forinil commented on GitHub (Jul 8, 2020): @Saviq Here it is: [settings.zip](https://github.com/microsoft/terminal/files/4889944/settings.zip) AS fasr as I can tell it's valid JSON, it just fails schema validation for some reason, even though it conforms with the documentation.
Author
Owner

@Saviq commented on GitHub (Jul 8, 2020):

Hi @Forinil, your file has a BOM at the beginning - you probably created it in Visual Studio. Just change the encoding to "UTF-8" when saving it and you'll be fine.

We'll fix Multipass to not choke on it, in the mean time.

I believe this issue can be closed here.

@Saviq commented on GitHub (Jul 8, 2020): Hi @Forinil, your file has a [BOM](https://en.wikipedia.org/wiki/Byte_order_mark) at the beginning - you probably [created it in Visual Studio](https://stackoverflow.com/questions/44098326/ef-bb-bf-at-the-beginning-of-json-files-created-in-visual-studio). Just change the encoding to "UTF-8" when saving it and you'll be fine. We'll fix Multipass to not choke on it, in the mean time. I believe this issue can be closed here.
Author
Owner

@Forinil commented on GitHub (Jul 8, 2020):

I think it was created by Windows Terminal, but I edited and validated using Liquid Studio 2019.

Editing it in Notepad++ and changing encoding from UTF-8 with BOM to UTF-8 did solve my issue with multipass, but it did not fix validation errors in Liquid Studio or in https://www.jsonschemavalidator.net/ and while they do not bother me, as long as WT interprets the settings correctly, I still think the issue should be addressed.

@Forinil commented on GitHub (Jul 8, 2020): I think it was created by Windows Terminal, but I edited and validated using Liquid Studio 2019. Editing it in Notepad++ and changing encoding from `UTF-8 with BOM` to `UTF-8` did solve my issue with multipass, but it did not fix validation errors in Liquid Studio or in [https://www.jsonschemavalidator.net/](https://www.jsonschemavalidator.net/) and while they do not bother me, as long as WT interprets the settings correctly, I still think the issue should be addressed.
Author
Owner

@Forinil commented on GitHub (Jul 8, 2020):

That being said - @Saviq thank you for your help and for a fast response.

@Forinil commented on GitHub (Jul 8, 2020): That being said - @Saviq thank you for your help and for a fast response.
Author
Owner

@Saviq commented on GitHub (Jul 8, 2020):

but it did not fix validation errors in Liquid Studio or in https://www.jsonschemavalidator.net/ and while they do not bother me, as long as WT interprets the settings correctly, I still think the issue should be addressed.

Oh? It validated fine online there for me. I didn't upload the file, but rather its contents, so that may still be the BOM acting up…

And you're welcome :)

@Saviq commented on GitHub (Jul 8, 2020): > but it did not fix validation errors in Liquid Studio or in [https://www.jsonschemavalidator.net/](https://www.jsonschemavalidator.net/) and while they do not bother me, as long as WT interprets the settings correctly, I still think the issue should be addressed. Oh? It [validated fine online there](https://www.jsonschemavalidator.net/s/wAwSBVCL) for me. I didn't upload the file, but rather its contents, so that may still be the BOM acting up… And you're welcome :)
Author
Owner

@Forinil commented on GitHub (Jul 8, 2020):

I uploaded the contents rather than the file as well. The difference was I copy-pasted the schema rather than using a reference, which seems to make all the difference.

In any way this does not seem to be a bug in Windows Terminal, so I'm closing this issue.

@Forinil commented on GitHub (Jul 8, 2020): I uploaded the contents rather than the file as well. The difference was I copy-pasted the schema rather than using a reference, which seems to make all the difference. In any way this does not seem to be a bug in Windows Terminal, so I'm closing this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9495