Note: Factorio allows you to configure keybindings. If you use this library, these should be set to the defaults (based on a QWERTY layout).
Copy the compiled xlib-hooks-amd64.so
file into SteamLibrary/SteamApps/common/Factorio/
.
LD_PRELOAD="./xlib-hooks-amd64.so" %COMMAND%
Then run Factorio through Steam as normal.