How to use the pre compiled keyboard HookDLL

I am building a software in which I need to hook the keyboard and capture keys pressed by a user before any application receives it.

I have tried to develop my own hook but it keeps failing in a few software like CorelDraw, various browsers, LibreOffice, etc.

As a solution I think it would be easier for me to use the ready to use pre compiled HookDLLs that are used by Keyman and are guaranteed to work.

All help is highly appreciated.

TIA

I tried to capture keypresses in a custom Android app (to compile statistics on which letters were typed most often, not keylogging) via the Android engine, and it seemed to be [reasonably] locked down for security reasons. I’d be curious to know if this is possible on any platform.

@YogiYang, I don’t think that’s a viable approach. However, you could take the keyman code as a basis – it’s open source so you can fork it and do what you want with it. Hooks are very tricky to get right – we have literally 30 years of experience embedded in the Keyman code. We won’t have the resources to help you navigate the code for this purpose, however.

@Matthew_Lee, every platform is completely different. It’s relatively easy on desktop platforms – albeit with many security and compatibility caveats. Android and iOS, no.

See the Keyman source for some ideas on how – for Windows, Linux, macOS.

1 Like