From 518cb73ce79c63d49ed5ad3a5290187331820a7e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 3 Oct 2015 15:01:48 -0700 Subject: [PATCH] fixes #13 Emulation problem with control keys --- termbox/compat.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/termbox/compat.go b/termbox/compat.go index 586bde6..ac9988f 100644 --- a/termbox/compat.go +++ b/termbox/compat.go @@ -286,7 +286,10 @@ func makeEvent(tev tcell.Event) Event { return Event{Type: EventResize, Width: w, Height: h} case *tcell.EventKey: k := tev.Key() - ch := tev.Rune() + ch := rune(0) + if k == tcell.KeyRune { + ch = tev.Rune() + } mod := tev.Mod() return Event{ Type: EventKey,