diff options
author | Joe <rbo@gmx.us> | 2023-12-20 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2023-12-20 20:20:20 +0100 |
commit | fe2247be891c708732fe823214b2b59d7de2073b (patch) | |
tree | 5de17fba68c078920a9bf4e58143712bd106ae3a /i_events.go | |
parent | in progress (diff) | |
download | hardflip-fe2247be891c708732fe823214b2b59d7de2073b.tar.gz hardflip-fe2247be891c708732fe823214b2b59d7de2073b.tar.bz2 hardflip-fe2247be891c708732fe823214b2b59d7de2073b.tar.xz hardflip-fe2247be891c708732fe823214b2b59d7de2073b.tar.zst hardflip-fe2247be891c708732fe823214b2b59d7de2073b.zip |
more
Diffstat (limited to 'i_events.go')
-rw-r--r-- | i_events.go | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/i_events.go b/i_events.go index c1a3951..ba1b910 100644 --- a/i_events.go +++ b/i_events.go @@ -76,30 +76,23 @@ func i_events(data *HardData) { event.Rune() == 'q' { ui.s.Fini() os.Exit(0) - } - if event.Rune() == 'j' || + } else if event.Rune() == 'j' || event.Key() == tcell.KeyDown { if ui.sel < ui.sel_max - 1 { ui.sel += 1 } - } - if event.Rune() == 'k' || + } else if event.Rune() == 'k' || event.Key() == tcell.KeyUp { if ui.sel > 0 { ui.sel -= 1 } - } - if event.Rune() == 'g' { - ui.sel = 0 - } - if event.Rune() == 'G' { - ui.sel = ui.sel_max - 1 - } - if event.Rune() == 'D' { + } else if event.Rune() == 'g' { + ui.sel = 0 + } else if event.Rune() == 'G' { + ui.sel = ui.sel_max - 1 + } else if event.Rune() == 'D' { ui.mode = DELETE_MODE - ui.delete_id = ui.sel - } - if event.Key() == tcell.KeyEnter { + } else if event.Key() == tcell.KeyEnter { ui.s.Fini() c_exec(ui.sel, data.lhost) if data.opts.loop == false { |