enBoxer/docs/DESIGN.md
en 4daf0ea86a Initial enBoxer: mapped-key routing and Video FX on Hyprland.
Phase 1 tickets T1–T6, ponytail dead-code cuts, docs and plan in-tree.
2026-09-15 07:19:15 +02:00

44 lines
1.9 KiB
Markdown

# Design
enBoxer is a Hyprland session that sits beside several WoW windows. It is not loaded into the game.
## Process
```
keyboard / mouse
Hyprland (only while a managed WoW window or an enBoxer overlay is focused)
│ hl.bind (mapped keys, consumed)
enboxer daemon ← unix socket ($XDG_RUNTIME_DIR/enboxer/enboxer.sock)
├─ mapped-key engine (targets, delays, hold, game_binds)
├─ Lua: hl.dsp.send_shortcut | send_key_state
└─ Video FX: grim → overlay window
```
Delivery is compositor input to a window address.
## Routing
1. **Session off** (focus is not a captured slot and not an enBoxer overlay): no binds. Normal desktop.
2. **Mode `maps` (default):** only `maps[].hotkey` are intercepted. Everything else, including movement, goes to the focused primary.
3. **`passthrough`:** never intercepted, even if a map lists them. Default `[]`. Put `e s d f` here to keep those letters on the primary.
4. **Mode `repeater`:** also clone `repeater.keys` to other slots (explicit list).
5. **Mode `disabled`:** same as session off, with a hotkey to turn maps back on.
6. **Video FX hover + `pass_through`:** keys and clicks inside the viewer go to the **source slot only**.
A map with `target: others` never delivers to the primary. A map with `target: all` consumes the OS key and re-sends to every slot including primary (no double-tap).
## Interact / loot
See `docs/MACROS.md`. Stock `loot` map: assist + CTM on + Interact with Target + delay + CTM off, all `others`. Delay is configurable; we do not spam interact.
## Video FX
Each feed is a source rect (slot + normalized box) plus a viewer rect on the current primary. Overlay class `enboxer-vfx`. Capture is `grim` of visible pixels. Covered windows need `hyprland-toplevel-export` (later).
## Config
One YAML profile (`~/.config/enboxer/profile.yaml` or `-c`). Reload maps without restarting WoW.