Generic expandable keyboard layout system and Spanish support - #494
Open
marc-romu wants to merge 3 commits into
Open
Generic expandable keyboard layout system and Spanish support#494marc-romu wants to merge 3 commits into
marc-romu wants to merge 3 commits into
Conversation
Adds new layout definitions under src/lib/layouts and an IntlBackslash base key so the ISO key between left Shift and Z is displayed correctly. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
|
The compilation for this PR is downloadable here: https://github.com/marc-romu/keyviz/releases/tag/2.1.2-dev.260822 |
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.
Summary
This PR introduces a new generic, auto-discoverable keyboard layout system to provide compatibility beyond the currently supported US English layout. Adding a new layout now requires dropping a single file into
src/lib/layouts/— no UI or store changes needed. Spanish (Spain), German, French and Colemak0 layouts are included as the first non-US layouts, together with Windows fixes for AltGr and scancode-based key identification.What changed
src/lib/layouts/*.tsfiles are collected automatically at build time viaimport.meta.glob. Each file exports anid, human-readablenameand a per-keyoverridesmap. The settings dropdown, keycap renderer, filter grid, and shortcut recorder all consume this dynamically.get_win_key(vk_code, scancode)instead of raw virtual-key codes. This identifies physical keys consistently even when the active Windows layout is not US English.AltGris delivered asCtrl+Alt, merges the two events back into a singleAltGrpress/release, and suppresses the phantomControlLeft/Altspam. This works for any AltGr layout (Spanish, German, French, etc.).es.ts) with overrides forñ,ç,´,^,¡/¿,º/ª, etc.2.1.1→2.1.2.How to add another layout
Create
src/lib/layouts/<id>.ts:No other files need to be touched.
Fixes
Issue #15
Issue #150
Discussion #16