C# Mono - Low Level Keyboard Hook

后端 未结 2 1106
我寻月下人不归
我寻月下人不归 2021-01-19 09:07

I\'m using code that I found on the CodeProject.com for a low-level keyboard hook. The only problem is it uses external DLL calls that don\'t work in mono. I was wondering

相关标签:
2条回答
  • 2021-01-19 09:41

    Without knowing what you are trying to capture, it's hard to be sure what will work for you. You may want to look at using Application.AddMessageFilter.

    An example is here: http://dn.codegear.com/article/30129

    0 讨论(0)
  • 2021-01-19 09:42

    It's not possible to get this behavior using only .Net. You have to use a binary driver for each platform you run on (Windows, Linux, Mac OS). It might be possible to use only P/Invoke (detect what OS you are running on, call appropriate system libraries) so that you won't have to distribute any "extra" dll/so/dylib.

    0 讨论(0)
提交回复
热议问题