mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #820] Add Ctrl-P up() and Ctrl-N down() support #597
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#597
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 @convto on GitHub (Mar 4, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/820
In Emacs and similar editors, Ctrl-P/Ctrl-N is equivalent to arrow up/arrow down.
I am familiar with such shortcuts and would like to add support for this if possible.
I have checked the code for this project and it does not have critical interference with existing shortcuts,
Ctrl-P/Ctrl-N are only used in demos.
And Ctrl-P/Ctrl-N support would be possible to add by adding
tcell.KeyCtrlPortcell.KeyCtrlNto the part that detects the arrow key input, like this:github.com/rivo/tview@db36428c92/table.go (L1590-L1593)If maintainers agree with this opinion, I will try to create a patch.
Thanks for making an awesome project!
@rivo commented on GitHub (Mar 4, 2023):
No need for a patch. You can use
SetInputCaptureto customize your key binds.@convto commented on GitHub (Mar 5, 2023):
I thought if I could add Ctrl-P/Ctrl-N support to the master branch it would save me some future work,
but the library has designs and policies, so I'll follow your guide!
Thanks for answering!
@convto commented on GitHub (Mar 5, 2023):
I'll close this ticket now that it's resolved, Thanks!