Low level keyboard input from Windows

后端 未结 5 1329
时光取名叫无心
时光取名叫无心 2021-01-06 01:19

What win32 calls can be used to detect key press events globally (not just for 1 window, I\'d like to get a message EVERY time a key is pressed), from a windows service?

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-06 01:51

    If you are implementing this in a .net application i'd recommend GlobalKeyboardHook, Otherwise i'd look at it's source and take what you need since it is implementing the DLLImport functions mentioned above.

提交回复
热议问题