mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[PR #343] [CLOSED] Feat: allow to override key bindings for tree actions #917
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#917
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?
📋 Pull Request Information
Original PR: https://github.com/rivo/tview/pull/343
Author: @jumale
Created: 9/9/2019
Status: ❌ Closed
Base:
master← Head:treeview-bind-keys📝 Commits (1)
3d2ab19allow to override key bindings for tree actions📊 Changes
2 files changed (+94 additions, -48 deletions)
View changed files
📝
demos/treeview/main.go(+5 -0)📝
treeview.go(+89 -48)📄 Description
Previous behaviour
The
treeviewprovides some statically hardcoded key bindings for interacting with the tree. The consumers of the package are not able to re-define those bindings.New behaviour
The
treeviewreads the key bindings from a configurable map.There is a default map of keys to actions, initialised for each new
TreeView.However it's possible to redefine key bindings for each action, using method
SetKeyBindingBenefits
I want to be able to reassign the default key bindings and implement some custom tree actions for some keys which currently taken by treeview.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.