Skip to content

Commit

Permalink
Merge pull request #3 from ro4/master
Browse files Browse the repository at this point in the history
bugfix: debug output message can't show rune key (printable character…
  • Loading branch information
mylxsw committed May 13, 2019
2 parents a9470dc + d6ff6dc commit 7be90a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tui/tui.go
Expand Up @@ -115,7 +115,11 @@ func NewRedisTUI(redisClient api.RedisClient, maxKeyLimit int64, version string,
tui.app.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {

if tui.config.Debug {
tui.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())
}
tui.outputChan <- core.OutputMessage{Message: fmt.Sprintf("Key %s pressed", keyName)}
}

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

0 comments on commit 7be90a4

Please sign in to comment.