Implement ray-casting based physical to logical layout conversion#16
Draft
Copilot wants to merge 7 commits intofeat/new-layout-convertfrom
Draft
Implement ray-casting based physical to logical layout conversion#16Copilot wants to merge 7 commits intofeat/new-layout-convertfrom
Copilot wants to merge 7 commits intofeat/new-layout-convertfrom
Conversation
The new algorithm uses ray-casting and clustering to convert physical key positions to logical row/column assignments. Key features: - Ray-casting to find neighbor candidates in local coordinate space - Bidirectional neighbor relationship validation - Detection of conflicting relationships (keys seeing each other in the same direction) - Union-Find based clustering for column and row groups - Support for standard grids (integer positions) with position-based grouping - Support for rotated/staggered layouts with neighbor-based clustering - Gap detection to add empty columns/rows for large physical gaps - Proper handling of non-uniform key sizes (2U, 3U keys) Co-authored-by: Genteure <11240579+Genteure@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
shield-wizard | 99e295a | Commit Preview URL Branch Preview URL |
Jan 30 2026, 04:33 PM |
- Fix nullish coalescing for rotation origin (rx/ry) to handle 0 values - Remove unused second parameter from physicalToLogical call sites - Extract magic numbers as named constants with documentation - Improve code clarity with descriptive constant names Co-authored-by: Genteure <11240579+Genteure@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new algorithm for physical to logical layout conversion
New ray-casting algorithm for physical to logical layout conversion
Jan 30, 2026
Co-authored-by: Genteure <11240579+Genteure@users.noreply.github.com>
Co-authored-by: Genteure <11240579+Genteure@users.noreply.github.com>
Copilot
AI
changed the title
New ray-casting algorithm for physical to logical layout conversion
Implement ray-casting based physical to logical layout conversion
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converts physical key layouts (x, y, rotation coordinates) to logical grid positions (row, col integers) using ray-casting and clustering.
Algorithm
Changes
src/lib/physicalToLogical.ts: New algorithm implementationsrc/components/layouthelper.ts: Updated to use newphysicalToLogicalfunctionkeyCenterfromgeometry.tsfor center calculationExample
Known Limitations
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.