fix(developer): touch layout was not converting all special keycaps

Fixes #9161.

kmw-compiler was converting only the first key cap with `*special*`
caption, rather than all key caps.
This commit is contained in:
Marc Durdin 2023-07-04 14:44:42 +07:00
parent d2acfdec5c
commit 4d64cb2d38

View file

@ -188,9 +188,9 @@ function TransformSpecialKeys14(FDebug: boolean, sLayoutFile: string): string {
for(let i = 0; i < CSpecialText14Map.length; i++) {
// Assumes the JSON output format will not change
if(FDebug) {
sLayoutFile = sLayoutFile.replace('"text": "'+CSpecialText14Map[i][0]+'"', '"text": this._v>13 ? "'+CSpecialText14Map[i][0]+'" : "'+CSpecialText14Map[i][1]+'"');
sLayoutFile = sLayoutFile.replaceAll('"text": "'+CSpecialText14Map[i][0]+'"', '"text": this._v>13 ? "'+CSpecialText14Map[i][0]+'" : "'+CSpecialText14Map[i][1]+'"');
} else {
sLayoutFile = sLayoutFile.replace('"text":"'+CSpecialText14Map[i][0]+'"', '"text":this._v>13?"'+CSpecialText14Map[i][0]+'":"'+CSpecialText14Map[i][1]+'"');
sLayoutFile = sLayoutFile.replaceAll('"text":"'+CSpecialText14Map[i][0]+'"', '"text":this._v>13?"'+CSpecialText14Map[i][0]+'":"'+CSpecialText14Map[i][1]+'"');
}
}
}