7b8a1b2838
New release branch per the release-branch model (operator decision; local/AGENTS.md reserves branch creation to the operator). sync-versions.sh, driven by bump-release.sh, rewrites: - Cat 1 in-house crates -> version = 0.3.2 - Cat 2 upstream forks -> <upstream-tag>+rb0.3.2 Labels only; no fork source was rebased in this commit. bump-release.sh reports these forks as having newer upstream tags, to be taken next: relibc 0.2.5 -> 0.6.0 syscall 0.9.0 -> 0.9.1 libredox 0.1.18 -> 0.1.19 redoxfs and redox-scheme are already current. kernel, bootloader and installer are 'diverged' in the fork map and stay report-only (manual rebase); bootloader additionally has no merge-base with upstream.
redbear-keymapd
Keyboard layout daemon — scancode-to-character translation with builtin keymaps, JSON keymap loading, and XKB integration.
Status: FEATURE-INCOMPLETE
Category: system
Build: ./local/scripts/build-redbear.sh redbear-full (via redbear-full.toml)
Purpose
Manages keyboard layouts and performs scancode-to-character translation for Red
Bear OS. Supports six builtin keymaps (US, GB, dvorak, azerty, bepo, it), runtime
loading from JSON keymap files, and optional XKB-backed keymap loading via
libxkbcommon. Compositors and terminal emulators query this daemon to translate
raw scancodes into Unicode characters.
Interface
- Scheme:
keymap— path convention:keymap:/active,keymap:/list,keymap:/keymap/<name>,keymap:/set/<name> - Init service:
/usr/lib/init.d/13_redbear-keymapd.service - Configuration: Environment variables:
KEYMAP_DIR(default/etc/keymaps),XKB_CONFIG_ROOT,XKB_DEFAULT_LAYOUT(defaultus),XKB_DEFAULT_VARIANT
Architecture
| File | Purpose |
|---|---|
src/main.rs |
Daemon entry — loads builtins → JSON keymaps → XKB keymap, registers scheme:keymap |
src/scheme.rs |
KeymapScheme — implements SchemeSync with openat/read/write/fstat/fpath |
src/keymap.rs |
Keymap type + BuiltinKeymaps — scancode lookup tables for 6 keyboard layouts |
src/xkb.rs |
XKB integration — loads keymaps via libxkbcommon /usr/share/X11/xkb |
src/lib.rs |
Library crate keymapd — shared types for potential consumers |
Dependencies: redox-scheme, redox_syscall, serde, serde_json (path deps + crates.io).
Consumers
evdevd— translates scancodes usingkeymap:/keymap/<name>orkeymap:/active- Wayland compositors (
redbear-compositor,kwin) — query layout info for keyboard handling - Terminal emulators (
konsole, etc.) — key translation for text input
Status Notes
- Compiles against the current relibc/kernel forks.
- Six builtin keymaps are embedded and load immediately at startup.
- JSON keymap loading from
KEYMAP_DIRis implemented — expects JSON files with per-scancode entries, compose tables, and dead-key maps. - XKB integration is wired but depends on
libxkbcommondata files being staged at/usr/share/X11/xkb— this path was recently re-enabled in the build. - Runtime keymap switching works via writing a keymap name to
keymap:/active. - No runtime validation on bare metal or QEMU for XKB path. Builtin keymaps are validated at compile time via unit tests in the keymap module.