mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[PR #51] [CLOSED] added keyHandlers for overriding specific keys on input fields #845
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#845
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/51
Author: @pjtatlow
Created: 2/6/2018
Status: ❌ Closed
Base:
master← Head:master📝 Commits (1)
bba6623added keyHandlers for overriding specific keys on input fields📊 Changes
1 file changed (+22 additions, -1 deletions)
View changed files
📝
inputfield.go(+22 -1)📄 Description
I need the ability to intercept specific keys on an input field to do specific things. and this is my solution! It allows you to register a function with the input field as a handler for any given key, and in the input field's InputHandler function it runs that function. Handler functions are able return true or false to tell the InputHandler to continue handling that key event as normal or not.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.