Skip to content

Commit

Permalink
add support for autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
mylxsw committed Aug 2, 2019
2 parents 57fd391 + 7be90a4 commit 57ebb51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ func NewRedisTUI(redisClient api.RedisClient, maxKeyLimit int, version string, g
ui.app.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {

if ui.config.Debug {
ui.outputChan <- core.OutputMessage{Message: fmt.Sprintf("Key %s pressed", tcell.KeyNames[event.Key()])}
keyName := event.Name()
if event.Key() == tcell.KeyRune {
keyName = string(event.Rune())
}
ui.outputChan <- core.OutputMessage{Message: fmt.Sprintf("Key %s pressed", keyName)}
}

name := ui.keyBindings.SearchKey(event.Key())
Expand Down

0 comments on commit 57ebb51

Please sign in to comment.