Ivan Hedz
Ivan Hedz

Reputation: 31

Flutter[desktop]: how to get input from physical keyboard without textfield?

I have been working on Flutter desktop and stuck at the point where I need to get a keyboard key input, without TextField, like in any desktop application or game. How can I work with input streams without TextFields?

Upvotes: 2

Views: 3628

Answers (1)

smorgan
smorgan

Reputation: 21609

You want a RawKeyboardListener.

An important caveat is that desktop support for that is still a work in progress; on Linux and Windows you'll currently get an Android key event that's only partially populated.

Upvotes: 2

Related Questions