I am trying to select the first clickable element in a layout (Column) when 'Down' on the keyboard is pressed, when no elements are selected.
However,
Modifier.onKeyEvent {}
requires the component or its children to have focus. I tried requesting focus on the Layout itself, but it automatically moves focus on the first element, which is something I don't want. (code in ๐งต )
Is there any way I can achieve this? This is for Compose Multiplatform (same behavior on Web + Desktop)
Alex Styl
04/30/2024, 6:45 PM
What I tried (which automatically selects the first element โ bad):