Skip to content

How to get access to KeyEventType #3352

Answered by ogoffart
quendimax asked this question in Q&A
Discussion options

You must be logged in to vote

Note that as the name says, this API is unstable and may change accross releases.

But you can forward a callback from a FocusScope

enum KeyEventAction { pressed, release }
//...
FocusScope {
    key-pressed(event) => {  SomeGlobal.key-event(KeyEventAction.pressed, event.text)  }
}

something similar to that.
And then handle these events in rust.

Replies: 1 comment 2 replies

Comment options

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

@ogoffart
Comment options

Answer selected by quendimax
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