Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request #53 from panter-dsd/feature/HomeEndKeys
Browse files Browse the repository at this point in the history
Use Home and End keys to navigate Top/Bottom.
  • Loading branch information
cjbassi authored Aug 20, 2018
2 parents fc56114 + 94e4cd8 commit 603e851
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/widgets/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,19 @@ func (self *Proc) keyBinds() {
self.KeyPressed <- true
})

viKeys := []string{"j", "k", "gg", "G", "<C-d>", "<C-u>", "<C-f>", "<C-b>"}
viKeys := []string{"j", "k", "gg", "G", "<C-d>", "<C-u>", "<C-f>", "<C-b>", "<home>", "<end>"}
ui.On(viKeys, func(e ui.Event) {
switch e.Key {
case "j":
self.Down()
case "k":
self.Up()
case "<home>":
fallthrough
case "gg":
self.Top()
case "<end>":
fallthrough
case "G":
self.Bottom()
case "<C-d>":
Expand Down

0 comments on commit 603e851

Please sign in to comment.