aboutsummaryrefslogtreecommitdiffstats
path: root/src/e_keys.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-09-23 15:30:05 +0200
committerJoe <rbo@gmx.us>2024-09-23 15:30:05 +0200
commitfc2186ec5c8859589d9cb3cb0612135d24369cfe (patch)
treee2f568a5947047cdbaabff6f750336b27b47a690 /src/e_keys.go
parentfixed segv (diff)
downloadhardflip-fc2186ec5c8859589d9cb3cb0612135d24369cfe.tar.gz
hardflip-fc2186ec5c8859589d9cb3cb0612135d24369cfe.tar.bz2
hardflip-fc2186ec5c8859589d9cb3cb0612135d24369cfe.tar.xz
hardflip-fc2186ec5c8859589d9cb3cb0612135d24369cfe.tar.zst
hardflip-fc2186ec5c8859589d9cb3cb0612135d24369cfe.zip
wip
Diffstat (limited to 'src/e_keys.go')
-rw-r--r--src/e_keys.go19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/e_keys.go b/src/e_keys.go
index e7c71c8..e64f727 100644
--- a/src/e_keys.go
+++ b/src/e_keys.go
@@ -76,10 +76,6 @@ func e_normal_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
} else if event.Key() == tcell.KeyCtrlU ||
event.Key() == tcell.KeyPgUp {
data.litems.inc(-(ui.dim[H] / 3))
- } else if event.Key() == tcell.KeyCtrlF {
- // TODO: maybe keymap these
- } else if event.Key() == tcell.KeyCtrlB {
- // TODO: maybe keymap these
} else if event.Rune() == '}' ||
event.Rune() == ']' {
if next := data.litems.curr.next_dir(); next != nil {
@@ -262,6 +258,10 @@ func e_normal_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
} else {
ui.buff.insert(data.litems.curr.Dirs.Name)
}
+ } else if (event.Rune() == '/' ||
+ event.Key() == tcell.KeyCtrlF) &&
+ data.litems.curr != nil {
+ ui.mode = FUZZ_MODE
} else if event.Rune() == '?' {
ui.mode = HELP_MODE
ui.help_scroll = 0
@@ -915,3 +915,14 @@ func e_help_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
}
return false
}
+
+func e_fuzz_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
+ if event.Key() == tcell.KeyEscape ||
+ event.Key() == tcell.KeyCtrlC {
+ ui.s.HideCursor()
+ ui.mode = NORMAL_MODE
+ ui.buff.empty()
+ return true
+ }
+ return false
+}