adamws / adamws/kle-ng

Add international languages and layouts (e.g. from kbdlayout.info)

未关闭
#77 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
262
派生
15
PR 合并指标
30 天内没有已合并 PR

描述

### Motivation & Problem Description

Currently, `kle-ng` has a great preset browser and presets catalogue (e.g. ANSI 104, ISO 105, Default 60%, ISO 60%, Planck, ErgoDox, etc.). However, presets are mostly limited to US legends (with ISO 105 providing UK legends).

Many keyboard builders and keycap designers work with localized / international layouts (e.g. German QWERTZ, French AZERTY / BÉPO, Spanish, Nordic, Italian, Japanese JIS, or alternative layouts like Colemak and Dvorak). Currently, creating layouts for these languages requires manually editing every key's legends (primary, Shift, AltGr) or finding and pasting raw JSON from external sources.

### Proposed Feature

Add support for international languages and keyboard layouts into `kle-ng`, leveraging [kbdlayout.info](https://kbdlayout.info/) as an authoritative reference or data source.

[kbdlayout.info](https://kbdlayout.info/) documents over 200 Windows keyboard layouts (by KLID and language code), detailing:
- Key scan codes and positions
- Base, Shift, AltGr, and Shift+AltGr characters
- Dead keys and ligatures
- ANSI and ISO variants

### Potential Implementation Ideas

1. **Expanded Preset Catalogue**:
- Add localized presets for common language layouts (e.g., German ISO/ANSI, French AZERTY/BÉPO, Spanish, Nordic, Japanese JIS, etc.) to `public/data/presets/` and register them in `src/data/presets.json`.
- With the searchable preset catalogue modal introduced in recent versions, these could be easily tagged and filtered by language or country keywords.

2. **Legend / Layout Switcher / Overlay**:
- An option to apply or swap legends on an existing physical layout (e.g. apply German or French legends to any existing ANSI or ISO board based on standard scan codes / key positions).

3. **Ingestion / Conversion Tooling**:
- Provide a script/tool to parse layout data from [kbdlayout.info](https://kbdlayout.info/) (or standard Windows keyboard layout definitions) and generate `kle-ng` compatible JSON presets.

### References & Links

- **Keyboard Layout Info**: https://kbdlayout.info/
- **Layouts by language**: https://kbdlayout.info/features/languages

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。