Zoff
Dima Avdeev
fun main() = application { val windowState = rememberWindowState() Window( onCloseRequest = ::exitApplication, state = windowState, onKeyEvent = { when (it.key) { Key.F11 -> { windowState.placement = WindowPlacement.Fullscreen true } Key.Escape -> { windowState.placement = WindowPlacement.Floating true } else -> false } } ) { Button(onClick = { windowState.placement = when(windowState.placement) { WindowPlacement.Fullscreen -> WindowPlacement.Floating else -> WindowPlacement.Fullscreen } }) { Text("Change window mode") } } }
A modern programming language that makes developers happier.