Hitting the Alt-key should not prevent input. Fixes #240

This commit is contained in:
Oliver 2019-03-24 19:21:52 +01:00
parent 8d5eba0c2f
commit 8a9e26fab0
2 changed files with 6 additions and 2 deletions

View File

@ -55,7 +55,7 @@ Refer to https://godoc.org/github.com/rivo/tview for the package's documentation
## Dependencies
This package is based on [github.com/gdamore/tcell](https://github.com/gdamore/tcell) (and its dependencies).
This package is based on [github.com/gdamore/tcell](https://github.com/gdamore/tcell) (and its dependencies) as well as on [github.com/rivo/uniseg](https://github.com/rivo/uniseg).
## Your Feedback

View File

@ -384,11 +384,15 @@ func (i *InputField) InputHandler() func(event *tcell.EventKey, setFocus func(p
moveWordLeft()
case 'f': // Move word right.
moveWordRight()
default:
if !add(event.Rune()) {
return
}
}
} else {
// Other keys are simply accepted as regular characters.
if !add(event.Rune()) {
break
return
}
}
case tcell.KeyCtrlU: // Delete all.