mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #489] TreeView button to jump up one level #355
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#355
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SoMuchForSubtlety on GitHub (Aug 22, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/489
Would it be possible to bind left arrow / h to jump up one level in a TreeView? I can make a pull request if you approve.
@rivo commented on GitHub (Oct 15, 2020):
I could probably add a new key binding to jump up one level. But it can't be "left arrow" because it's used for something else already. Maybe Ctrl-Left-Arrow (if that's possible). The question is also if that key binding should also cause all children to collapse or simply jump up without collapsing. Any thoughts?
@rivo commented on GitHub (Nov 17, 2020):
If there's no further input regarding this topic, I will close this issue.
@SoMuchForSubtlety commented on GitHub (Dec 6, 2020):
Sorry for the late response.
KeyLeftcurrently does the same thing asKeyUpin a TreeView, right?Ctrl+KeyLeftwould also work. I assume making it possible to reassign the default key bindings to allow deeper customization would entail a large amount of work that is probably not worth the effort.For collapsing I would tend to say no, but that could maybe be a configurable setting?
@rivo commented on GitHub (Jan 11, 2021):
I've added the "K" and "J" key binds to the
TreeViewwhich move you up and down the hierarchy, respectively. Unfortunately, there is noCtrlKeyLeftand using the key mod intcellis apparently not reliable on all platforms.But if you want to have your own key binds, you could use
SetInputCapture()to translate them.