Just for fun: Is there a way to detect and react to key presses outside the focus (or when minimized).
j
jim
11/29/2020, 4:05 PM
Compose can react to any state change in your app, so this question really just boils down to "can I detect key presses outside a window with Java". Java's default APIs don't allow this AFAIK, but with some JNI it should be possible. However, that's way outside the scope of this slack channel.
a
Animesh Sahu
11/29/2020, 4:06 PM
Ya thanks, I was just asking this for fun :)
s
spierce7
11/30/2020, 2:49 AM
I was able to do this years ago with a java library. It used JNI I believe. I looked, but can’t find it, but I found it at the time with Google searches. Maybe there is something better now 🙂
a
Animesh Sahu
11/30/2020, 2:58 AM
I'll try to build my own in Kotlin/Multiplatform for Windows+Linux and probably JVM too 😃
s
spierce7
11/30/2020, 4:48 AM
Be sure to post it on Github 🙂
👍 1
a
Animesh Sahu
12/08/2020, 7:31 AM
@spierce7 its here if you'd like to check out, will work on it slowly for other platforms as I go. Love to hear feedback :)