Skip to content

How can I add onKeyPressed/onKeyReleased functionality to a button? #3396

Answered by Jacalz
DAT4 asked this question in Q&A
Discussion options

You must be logged in to vote

You basically want to follow the tutorials on https://developer.fyne.io/extend/extending-widgets and https://developer.fyne.io/extend/numerical-entry to get an idea about how to extend widgets. It might also be good to watch https://www.youtube.com/watch?v=TDae1Kmxu_0 if you want the full understanding of how the interfaces work when you want to add additional functionality to your widgets.

To actually get the functionality you request, it would require implementing desktop.Keyable (desktop.Mouseable for mouse keys for the record but I don't think that is what you are asking for) to be able to get that kind of funtionality.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@DAT4
Comment options

@andydotxyz
Comment options

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