Skip to content

TolikPylypchuk/libuiohook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

741 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libUIOHook: Cross-platform keyboard and mouse hooking from userland.

Note

This is a fork of libuiohook that exists solely for the needs of SharpHook. It is not intended for general-purpose usage that's not related to SharpHook.

Compiling

Prerequisites:

  • CMake - at least version 4.2
  • GCC, Clang, or MSVC
  • X11 dependencies:
    • libx11-dev
    • libxtst-dev
    • libxrandr-dev
    • libxt-dev
    • libx11-xcb-dev
    • libxkbcommon-dev
    • libxkbcommon-x11-dev
    • libxkbfile-dev

To build, run the following commands:

git clone https://github.com/TolikPylypchuk/libuiohook
cd libuiohook
mkdir build && cd build
cmake -S .. -D BUILD_DEMO=ON -D CMAKE_INSTALL_PREFIX=../dist
cmake --build . --parallel 2 --target install

On Windows, add CMake parameters -G "Visual Studio 18 2026" and -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded. On macOS and Linux, add CMake parameter -G "Unix Makefiles".

On macOS, you can add the MAC_CATALYST=ON option to build libuiohook for Mac Catalyst instead of macOS.

You can optionally add the BUILD_DEMO=ON option to build demo applications, and BUILD_TEST=ON to build tests. Note that on Linux, tests require X11 to be present, so they cannot run in headless environments like CI pipelines.

Usage

About

A multi-platform C library to provide global keyboard and mouse hooks from userland.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C 96.7%
  • CMake 3.3%