Skip to content

feat(tools): xkbcompile — XKB layouts → .kbd - #708

Closed
alexis900 wants to merge 1 commit into
developfrom
feat/xkbcompile
Closed

alexis900 wants to merge 1 commit into
developfrom
feat/xkbcompile

Conversation

@alexis900

Copy link
Copy Markdown
Collaborator

Herramienta host para generar .kbd desde XKB (abierto y offline), en vez de depender de .klc (GUI de MSKLC + licencia Microsoft).

Qué

tools/xkbcompile:

  • resuelve cadenas include "file(section)" (p. ej. es(basic) → latin(type4) → latin(basic)), con override por orden.
  • EVDEV → scancode set-1 (set1 = evdev - 8); niveles 1-3 → normal/shift/altgr.
  • keysyms: nombres Latin-1, U<hex> y nombres comunes; marca dead keys y construye la tabla compose desde el Compose de X11.
  • README con uso y límites (un grupo, sin nivel 4, keysyms exóticos).

Verificación

us, es, fr, de. La salida de es coincide con el es-ES derivado del .klc:
sc 0x27=ñ/Ñ (altgr dead_tilde), 0x28=´/¨, 0x1a=`/^, 0x2b=ç/Ç, 0x0d=¡/¿ (altgr dead_cedilla).

Relacionado (no cierra)

Sourcing layouts from Microsoft `.klc` is awkward (MSKLC GUI) and the
files are Microsoft-licensed. Add a host tool that reads the open, offline
XKB data (`/usr/share/X11/xkb/symbols/*`) and emits the NeoDOS `.kbd`
format directly.

- resolves `include "file(section)"` chains, maps EVDEV -> set-1
  scancodes, maps levels 1-3 to normal/shift/altgr, translates Latin-1 /
  `U<hex>` / common keysym names, marks dead keys and builds the compose
  table from the X11 `Compose` file.
- verified `us`, `es`, `fr`, `de`: the `es` output matches the
  `.klc`-derived `es-ES` (ñ/Ñ, ´/¨, ç/Ç, dead keys, ¡/¿).

Related: #390 (dynamic .kbd discovery) — new layouts still need wiring
into the image allowlist and the kernel load list.
@alexis900

Copy link
Copy Markdown
Collaborator Author

Superado por #705: la herramienta xkbcompile se ha integrado en esa PR junto con el pipeline completo (XKB → .kbd + scripts + CI).

@alexis900 alexis900 closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant