fixes #85 Key press not registered (only key release) for some keys

This commit is contained in:
Garrett D'Amore 2016-03-23 10:49:51 -07:00
parent 5dc5326c0e
commit 04e5e8c5bc
1 changed files with 12 additions and 0 deletions

View File

@ -248,6 +248,18 @@ func (t *tScreen) prepareKeys() {
t.prepareKey(KeyCancel, ti.KeyCancel) t.prepareKey(KeyCancel, ti.KeyCancel)
t.prepareKey(KeyExit, ti.KeyExit) t.prepareKey(KeyExit, ti.KeyExit)
t.prepareKey(KeyBacktab, ti.KeyBacktab) t.prepareKey(KeyBacktab, ti.KeyBacktab)
outer:
for i := 0; i < ' '; i++ {
for _, esc := range t.keys {
if esc[0] == byte(i) {
continue outer
}
}
b := make([]byte, 1)
b[0] = byte(i)
t.keys[Key(i)] = b
}
} }
func (t *tScreen) Fini() { func (t *tScreen) Fini() {