How to detect keyboard input in a for loop #3043
Unanswered
anderslanglands
asked this question in
Q&A
Replies: 3 comments
-
Actually I realised even if I wrap the whole component in a FocusScope it doesn't receive events, and if I try to forward focus to the component then I get "element is not focusable" error:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Discovered that if I name the FocusScope and forward the focus from |
Beta Was this translation helpful? Give feedback.
0 replies
-
Great that you figure it out. One thing we should do is put the keyboard modifiers in the pointer event: #2686 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm just learning and trying to write a treeview. It's going well, but I want to be able to handle Ctrl-click and Shift-click on the rows, but I can't seem to detect keyboard input. My code currently looks like this:
the TouchArea works, but the debugs in the key-pressed and key-release events never fire. I've tried putting the FocusScope at the top level of the for (around the Rectangle) and got the same result. Can I make this work somewhow?
Beta Was this translation helpful? Give feedback.
All reactions