vaxis
created pr with
50.1
cmds
checkout latest patchset:
ssh pr.pico.sh print 50 | git am -3checkout any patchset in a patch request:
ssh pr.pico.sh print 50.[rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 50
Patchset
50.1
feat(vxfw.list): add arrow key events
Eric Bower
2025-03-12T16:16:12ZSemantic diff summary
0 added,
1 modified,
0 signature changed,
0 removed
across 1 analyzed file
+2
-2
vxfw/list/list.go
#
| ... | ... | @@ -60,14 +60,14 @@ func (d *Dynamic) CaptureEvent(ev vaxis.Event) (vxfw.Command, error) { | |
| 60 | 60 | // We capture key events | |
| 61 | 61 | switch ev := ev.(type) { | |
| 62 | 62 | case vaxis.Key: | |
| 63 | - | if ev.Matches('j') { | |
| 63 | + | if ev.Matches('j') || ev.Matches(vaxis.KeyDown) { | |
| 64 | 64 | cmd := d.NextItem() | |
| 65 | 65 | if cmd == nil { | |
| 66 | 66 | return nil, nil | |
| 67 | 67 | } | |
| 68 | 68 | return vxfw.ConsumeAndRedraw(), nil | |
| 69 | 69 | } | |
| 70 | - | if ev.Matches('k') { | |
| 70 | + | if ev.Matches('k') || ev.Matches(vaxis.KeyUp) { | |
| 71 | 71 | cmd := d.PrevItem() | |
| 72 | 72 | if cmd == nil { | |
| 73 | 73 | return nil, nil |