sequenceDiagram
    participant Input as Keyboard / Mouse
    participant App as termforge.App
    participant Dbg as DebuggerApp
    participant Widget as Widget · Tab / CmdWidget
    participant Bus as platform.EventBus
    participant Ctl as Ctl subscriber
    participant Render as Redraw

    Input ->> App: PollEvent · tcell.EventKey
    App ->> App: HandleKey(ev) · modeHandlers[Mode()]
    App ->> Dbg: mode handler · withGlobalKeys
    Dbg ->> Dbg: gates + key-sequence routing
    Dbg ->> Widget: HandleEvent(ev)
    Widget ->> App: PostInterrupt(SubmitMsg)
    App ->> Dbg: PollEvent · tcell.EventInterrupt
    Dbg ->> Bus: Dispatch(data)
    Bus ->> Ctl: typed handler registered in Register(bus)
    Ctl ->> Render: RequestFrame → Draw → Grid → Screen
