Browse Source

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

merge-requests/1/merge
Oliver 3 years ago
parent
commit
8a9e26fab0
  1. 2
      README.md
  2. 6
      inputfield.go

2
README.md

@ -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

6
inputfield.go

@ -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.

Loading…
Cancel
Save