`FocusManager.clearFocus()` says: > Call this f...
# compose-desktop
r
FocusManager.clearFocus()
says:
Call this function to clear focus from the currently focused component, and set the focus to the root focus modifier.
What is the "root focus modifier" on desktop? I have key events I want to always receive while my window is focused, but this appears to be impossible if
FocusManager.clearFocus()
is ever invoked. I end up in the situation where no composables in my window are focused, and therefore nothing receives key events.
Wondering if I'm missing a trick here, and there's some way of receiving keyboard events at the root level?
i
Use
Copy code
Window(onPreviewKeyEvent = )
Or this snippet