Changes for schema version 1.4
Hans5958 opened this issue · 3 comments
It seems that there are a lot of changes for 1.4. There are a lot of things that WL pinged me about, but somehow I still don't get an issue for them.
I still don't know how the new implementations are, so please create either a new issue or comment here. Schemas related to l10n should be listed on the other issue (#14).
No addon uses it yet, but we'll support settings of type "key"
. I don't think there's a real way of verifying default key combinations are correct, all I got is the JS code that detects the keys and outputs a string with them. If you wanna go crazy, build a regex for it :P
const string = e.ctrlKey
? "Ctrl" +
(e.shiftKey ? " + Shift" : "") +
(e.key == "Control" || e.key == "Shift"
? ""
: (e.ctrlKey ? " + " : "") +
(e.key.toUpperCase() === e.key
? e.code.includes("Digit")
? e.code.substring(5, e.code.length)
: e.key
: e.key.toUpperCase()))
: "";
Unfortunately, I still not quite understand about how it works. I think I need examples for it.
Moving that one to another issue and closing due to how stale this is.