From 9608f5b3b56ff2da69b6994c785f14dcf0960f1c Mon Sep 17 00:00:00 2001 From: Oliver <480930+rivo@users.noreply.github.com> Date: Sun, 14 Jan 2018 21:54:05 +0100 Subject: [PATCH] Clarifying SetInputCapture() in documentation. --- box.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/box.go b/box.go index fe8091f..ca5df43 100644 --- a/box.go +++ b/box.go @@ -121,11 +121,13 @@ func (b *Box) InputHandler() func(event *tcell.EventKey, setFocus func(p Primiti return b.wrapInputHandler(nil) } -// SetInputCapture sets a function which captures key events before they are +// SetInputCapture installs a function which captures key events before they are // forwarded to the primitive's default key event handler. This function can // then choose to forward that key event (or a different one) to the default // handler by returning it. If nil is returned, the default handler will not // be called. +// +// Providing a nil handler will remove a previously existing handler. func (b *Box) SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) *Box { b.inputCapture = capture return b