[PR #51] [CLOSED] added keyHandlers for overriding specific keys on input fields #845

Closed
opened 2026-03-04 01:08:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/51
Author: @pjtatlow
Created: 2/6/2018
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • bba6623 added 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.

## 📋 Pull Request Information **Original PR:** https://github.com/rivo/tview/pull/51 **Author:** [@pjtatlow](https://github.com/pjtatlow) **Created:** 2/6/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`bba6623`](https://github.com/rivo/tview/commit/bba6623a17d704cf418c17242ef8607637245d7f) added keyHandlers for overriding specific keys on input fields ### 📊 Changes **1 file changed** (+22 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `inputfield.go` (+22 -1) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:11 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#845
No description provided.