diff --git a/utils.go b/utils.go index 5e3a4cd..f7becb3 100644 --- a/utils.go +++ b/utils.go @@ -129,6 +129,11 @@ func CloseOnKeyPressed(screen *Screen, key tcell.Key) func(event *KeyEvent) (con screen.Stop() return true } + + if screen.Root != nil { + return screen.Root.OnKeyPressed(event) + } + return false } }