Skip to content

fix(developer): tighten touch layout file structural validity checks - #16347

Open
mcdurdin wants to merge 1 commit into
masterfrom
fix/developer/16214-tighten-touch-layout-file-validity
Open

fix(developer): tighten touch layout file structural validity checks#16347
mcdurdin wants to merge 1 commit into
masterfrom
fix/developer/16214-tighten-touch-layout-file-validity

Conversation

@mcdurdin

@mcdurdin mcdurdin commented Aug 11, 2026

Copy link
Copy Markdown
Member

Fixes: #16214
Fixes: KEYMAN-DEVELOPER-39Q
Test-bot: skip

@keymanapp-test-bot

keymanapp-test-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

  • Developer
    • Keyman Developer - build : all tests passed (no artifacts on BuildLevel "build")
    • Compiler Regression Tests - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip - build : all tests passed (no artifacts on BuildLevel "build")
  • Keyboards
    • Test Keyboards - build : all tests passed (no artifacts on BuildLevel "build")

Comment on lines +275 to +293
// Transform the layout keys with displayMap
if(displayMap) {
Osk.remapTouchLayout(data, displayMap);
}

// If not debugging, then this strips out formatting for a big saving in file size
// This also normalises any values such as Pad or Width which should be strings
const writer = new TouchLayoutFileWriter({formatted: FDebug});

sLayoutFile = writer.compile(data);

sLayoutFile = TransformSpecialKeys14(FDebug, sLayoutFile);

sLayoutFile = TransformSpecialKeys17(FDebug, sLayoutFile);

return {
output: sLayoutFile,
result
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes to this code, just factored the validation out of this function to simplify test.

Fixes: #16214
Fixes: KEYMAN-DEVELOPER-39Q
Test-bot: skip
@mcdurdin
mcdurdin force-pushed the fix/developer/16214-tighten-touch-layout-file-validity branch from e56351a to cd674fd Compare August 12, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

bug(developer): Updating old project file: fatal KM02900: Unexpected exception: TypeError: row.key is not iterable

1 participant