https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
l

Lindsay Peters

12/18/2023, 11:22 PM
How can I use a DesktopComposeTestRule to send a key combination like ALT+F4?
a

Alexander Maryanovsky

12/19/2023, 5:52 AM
Copy code
performKeyInput {
    withKeyDown(Key.AltLeft) {
        pressKey(Key.F4)
    }
}
👍 1
l

Lindsay Peters

12/19/2023, 6:03 AM
Thank you!
a

Alexander Maryanovsky

12/19/2023, 6:10 AM
You can also send individual key down/up events.
27 Views