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

Alexander Maryanovsky

02/25/2024, 4:46 PM
You have LocalWindowInfo.current.keyboardModifiers always available
h

Henri Gourvest

02/25/2024, 4:57 PM
Unfortunately I can't use it in an event because of this error. "@Composable invocations can only happen from the context of a @Composable function"
a

Alexander Maryanovsky

02/25/2024, 4:59 PM
You grab LocalWindowInfo.current into a variable in the composition, and then call keyboardModifiers on it in the event handler.
1
h

Henri Gourvest

02/25/2024, 5:10 PM
It worked very well, thank you very much
👍 1
4 Views