ioHub
ioHub copied to clipboard
Switch from python-Xlib to ctypes wrapper for Linux global hooks
The python-xlib package is not ideal in that it does not expose the full API and is not actively maintained. Due to lack of some APIs, doing the unicode keyboard char mapping is not ideal at all. Suggestion it to, when possible, switch to using a ctypes wrapper of the necessary Xlib API areas. I am already doing this to be able to more effectively hide / show the mouse cursor by using the xfixes xlib extension and also to be able to move the muse from one screen index to a location on a different screen.
I have noticed that master Alex Holkner has done an autogenerated xlib wrapper that includes most of what would be needed. I wonder if that xlib.py file could be borrowed and used, adding any missing wrappings needed. Would make the transition faster for sure.