Is there a multiplatform way of listening to key e...
# compose
f
Is there a multiplatform way of listening to key events globally?
s
You could create a shared flow in common code and post simple events objects/primitives to it
a
@Fudge depends on what you are trying to do it might be enough to put a
Modifier.onKeyEvent {}
on your Top level composable. I needed a way to detect key events without having focused composable, so I made a
KeyDownHandler
composable with expect/actual (for code click here)
f
thanks