Skip to content

How to listen for keyboard events #5316

Closed Answered by andydotxyz
runoneall asked this question in Q&A
Discussion options

You must be logged in to vote

This is the console output:

terminal.SetOnTypedKey undefined (type *"fyne.io/fyne/v2/widget".TextGrid has no field or method SetOnTypedKey)
terminal.OnKeyDown undefined (type *"fyne.io/fyne/v2/widget".TextGrid has no field or method OnKeyDown)

Correct, those APIs don't exist.

To have a widget respond to events you need to implement the handlers by extending. See docs at:
https://docs.fyne.io/extend/extending-widgets

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@runoneall
Comment options

Answer selected by runoneall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants