``e.g. using the window object after calling singleWindowApplication.
Currently, you can define keyboard event handlers during the call to singleWindowApplication, but afterward, it's impossible. I'd like the ability to hook up and add/remove keyboard handlers even after calling singleWindowApplication for this window.
Like for mouse event handling you can
@Composable
fun WindowsMouseEventBackHandler(
composeWindow: ComposeWindow,
navController: NavController
) {
val mouseListener = object : MouseListener {
override fun mouseClicked(event: MouseEvent?) {}
override fun mousePressed(event: MouseEvent?) {}
override fun mouseEntered(event: MouseEvent?) {}
override fun mouseExited(event: MouseEvent?) {}
override fun mouseReleased(event: MouseEvent?) {
event?.let {
if (it.button == 4) {
// todo navigateUp
}
}
}
}
LaunchedEffect(Unit) {
composeWindow.addMouseListener(mouseListener)
}
DisposableEffect(Unit) {
onDispose {
composeWindow.removeMouseListener(mouseListener)
}
}
}
``e.g. using the window object after calling singleWindowApplication.
Currently, you can define keyboard event handlers during the call to singleWindowApplication, but afterward, it's impossible. I'd like the ability to hook up and add/remove keyboard handlers even after calling singleWindowApplication for this window.
Like for mouse event handling you can