Summary
Allow each physical device to maintain its own independent layer stack, so layer changes on one device don't affect another.
Builds on the device identity pipeline from PR #5.
What this includes
- Per-device layer state in Layout — Instead of one global
default_layer and layer stack, maintain separate stacks keyed by device index
- Layer action scoping — Layer-switch actions apply only to the originating device's stack
- Fallback behavior — Devices without explicit layer config fall back to the global stack (backwards compatible)
Why
The main use case for per-device mappings is having fundamentally different layouts per keyboard (e.g., a split ergo board for typing and a macropad for shortcuts). Without per-device layer stacks, pressing a layer key on one device shifts layers for all devices.
Complexity note
This is a significant architectural change to keyberon's Layout struct. The current design assumes a single layer stack throughout. This will need careful design to avoid breaking existing behavior.
Dependencies
Summary
Allow each physical device to maintain its own independent layer stack, so layer changes on one device don't affect another.
Builds on the device identity pipeline from PR #5.
What this includes
default_layerand layer stack, maintain separate stacks keyed by device indexWhy
The main use case for per-device mappings is having fundamentally different layouts per keyboard (e.g., a split ergo board for typing and a macropad for shortcuts). Without per-device layer stacks, pressing a layer key on one device shifts layers for all devices.
Complexity note
This is a significant architectural change to keyberon's Layout struct. The current design assumes a single layer stack throughout. This will need careful design to avoid breaking existing behavior.
Dependencies