Animeshz / keyboard-mouse-kt

A lightweight multiplatform library for interacting with global keyboard and mouse events and states from Kotlin, Java and NodeJS.
https://animeshz.github.io/keyboard-mouse-kt
MIT License
52 stars 2 forks source link

Implementation of Linux's DeviceKeyboardHandler. #6

Open Animeshz opened 3 years ago

Animeshz commented 3 years ago

Only X11 based linux distro is supported right now, if the X11 is not accessible (though should be in most GUI distros), we can safely fallback to read events from the /dev/uinput or /dev/input/eventX.

This operation is only granted when the root access is given, so we'll always prioritize the X11 way to handle the communication.

To be fixed: DeviceKeyboardHandler.