Make make scroll up/down change the selection

pull/224/head
Simon Roberts 3 years ago
parent 8fa9cc2554
commit 2ca46155ae
No known key found for this signature in database
GPG Key ID: 0F30F99E6B771FD4

@ -85,5 +85,7 @@ func DefaultShortcuts() map[string]string {
"<": "scroll_left",
"+": "show_price_alert_add_menu",
"\\\\": "toggle_table_fullscreen",
"scrollup": "move_up_or_previous_page",
"scrolldown": "move_down_or_next_page",
}
}

@ -162,6 +162,10 @@ func (ct *Cointop) ParseKeys(s string) (interface{}, gocui.Modifier) {
key = gocui.KeyEnd
case "\\\\":
key = '\\'
case "scrollup":
key = gocui.MouseWheelUp
case "scrolldown":
key = gocui.MouseWheelDown
}
return key, mod
@ -372,8 +376,8 @@ func (ct *Cointop) SetKeybindings() error {
ct.SetKeybindingMod(gocui.MouseLeft, gocui.ModNone, ct.Keyfn(ct.MouseLeftClick), "")
ct.SetKeybindingMod(gocui.MouseMiddle, gocui.ModNone, ct.Keyfn(ct.MouseMiddleClick), "")
ct.SetKeybindingMod(gocui.MouseRight, gocui.ModNone, ct.Keyfn(ct.MouseRightClick), "")
ct.SetKeybindingMod(gocui.MouseWheelUp, gocui.ModNone, ct.Keyfn(ct.MouseWheelUp), "")
ct.SetKeybindingMod(gocui.MouseWheelDown, gocui.ModNone, ct.Keyfn(ct.MouseWheelDown), "")
// ct.SetKeybindingMod(gocui.MouseWheelUp, gocui.ModNone, ct.Keyfn(ct.MouseWheelUp), "")
// ct.SetKeybindingMod(gocui.MouseWheelDown, gocui.ModNone, ct.Keyfn(ct.MouseWheelDown), "")
// character key press to select option
// TODO: use scrolling table

Loading…
Cancel
Save