Merge pull request #53 from panter-dsd/feature/HomeEndKeys
Use Home and End keys to navigate Top/Bottom.
This commit is contained in:
commit
603e851f0a
|
@ -138,15 +138,19 @@ func (self *Proc) keyBinds() {
|
||||||
self.KeyPressed <- true
|
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) {
|
ui.On(viKeys, func(e ui.Event) {
|
||||||
switch e.Key {
|
switch e.Key {
|
||||||
case "j":
|
case "j":
|
||||||
self.Down()
|
self.Down()
|
||||||
case "k":
|
case "k":
|
||||||
self.Up()
|
self.Up()
|
||||||
|
case "<home>":
|
||||||
|
fallthrough
|
||||||
case "gg":
|
case "gg":
|
||||||
self.Top()
|
self.Top()
|
||||||
|
case "<end>":
|
||||||
|
fallthrough
|
||||||
case "G":
|
case "G":
|
||||||
self.Bottom()
|
self.Bottom()
|
||||||
case "<C-d>":
|
case "<C-d>":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user