mirror of https://github.com/gdamore/tcell.git
fixes #85 Key press not registered (only key release) for some keys
This commit is contained in:
parent
5dc5326c0e
commit
04e5e8c5bc
12
tscreen.go
12
tscreen.go
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue