By the way I'm also developing a
multiplatform library for global keyboard-mouse interaction as well, since most GUI framework I see didn't offer global processing while not in focus (and sometimes is required such as to hide the app in background and keyboard shortcut to pop it up, etc).
This lib provides both low level and high level access, If anyone interested, can always checkout
https://github.com/Animeshz/keyboard-mouse-kt