mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #69] question: How to handle normal keys? #49
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#49
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 @lesovsky on GitHub (Mar 10, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/69
Hi,
I've found in examples how to handle special keys, but nothing about normal, regular keys such as 'a','b','c', etc. Could you provide simple example?
Thanks
@lesovsky commented on GitHub (Mar 10, 2018):
Answer is found on tcell godoc --
For normal keys, like ASCII letters, we use KeyRune, and then expect the application to inspect the Rune() member of the EventKey.
@rivo commented on GitHub (Mar 10, 2018):
Yes, this is how it works. Glad you found it yourself. :-)