Gliner/UI/GlinerKeyCatcherPanel.razor
@using Sandbox
@using Sandbox.UI
@inherits Panel
@namespace GlinerPoc.UI

<root class="workbench">
	@ChildContent
</root>

@code
{
	// ChildContent comes from Panel itself; markup children are rendered
	// where @ChildContent appears.

	/// <summary>
	/// Transparent wrapper panel for the workbench. Keyboard events bubble
	/// from the focused TextEntry up through ancestors as ButtonEvents;
	/// overriding OnButtonEvent here is the only reliable way for a
	/// PanelComponent-based razor to observe them (PanelEvent listeners never
	/// see ButtonEvents — the two types are unrelated — and PanelComponent
	/// only forwards mouse events). Presentation plumbing only; no model
	/// semantics. Mirrors the engine's own DevUI LogEventPanel pattern.
	/// </summary>
	[Parameter] public Action<ButtonEvent> OnKey { get; set; }

	public override void OnButtonEvent( ButtonEvent e )
	{
		base.OnButtonEvent( e );
		OnKey?.Invoke( e );
	}
}