Global keyboard hook with WH_KEYBOARD_LL and keybd_event (windows)

前端 未结 3 1261
无人共我
无人共我 2020-12-30 09:38

I am trying to write a simple global keyboard hook program to redirect some keys. For example, when the program is executed, I press \'a\' on the keyboard, the program can d

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-30 09:53

    1. I have run your code but nothing happend? What wrong with me?
    2. Base on msdn that WH_KEYBOARD_LL message is "Global only" It mean more than that.

      The system calls this function .every time a new keyboard input event is about to be posted into a thread input queue. This message is special case. You also need an DLL to make a real global hook for other message.

提交回复
热议问题