diff options
author | Joe <rbo@gmx.us> | 2024-05-10 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-05-10 20:20:20 +0200 |
commit | e88398672f73e25a0c9cd66ea3637d73e01727f3 (patch) | |
tree | a18d96400e5d761fd6576da700a16da411594730 | |
parent | go (diff) | |
download | hardflip-e88398672f73e25a0c9cd66ea3637d73e01727f3.tar.gz hardflip-e88398672f73e25a0c9cd66ea3637d73e01727f3.tar.bz2 hardflip-e88398672f73e25a0c9cd66ea3637d73e01727f3.tar.xz hardflip-e88398672f73e25a0c9cd66ea3637d73e01727f3.tar.zst hardflip-e88398672f73e25a0c9cd66ea3637d73e01727f3.zip |
help
-rw-r--r-- | src/c_defs.go | 11 | ||||
-rw-r--r-- | src/e_keys.go | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/c_defs.go b/src/c_defs.go index b4ff837..928e4a3 100644 --- a/src/c_defs.go +++ b/src/c_defs.go @@ -179,6 +179,17 @@ const ( ) var ( + HELP_KEYS = [][2]string{ + {"j | <down>", "Down"}, + {"k | <up>", "Up"}, + {"a | i", "Insert host"}, + {"y", "Copy host"}, + {"d", "Cut host"}, + {"p", "Paste host"}, + } +) + +var ( HOST_ICONS = [4]string{" ", " ", " ", " "} DIRS_ICONS = [2]string{" ", " "} RDP_SCREENSIZE = [7]string{ diff --git a/src/e_keys.go b/src/e_keys.go index 16d6bf6..079dc88 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -840,6 +840,15 @@ func e_help_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { ui.mode = NORMAL_MODE ui.help_scroll = 0 return true + } else if event.Rune() == 'j' || + event.Key() == tcell.KeyDown { + } else if event.Rune() == 'k' || + event.Key() == tcell.KeyUp { + if ui.help_scroll >= 0 { + ui.help_scroll = 0 + return true + } + ui.help_scroll -= 1 } return false } |