locked
Global keyboard hook and menus RRS feed

  • Question

  • Hello,

    I have an application, that installs global keyboard hook (WH_KEYBOARD) from dll to capture keyboard input. My problem is, when there is any menu (right-click context menu, application main menu, ...) opened, the hook receives any key message twice.

    For example opening context menu and hitting up arrow key and right arrow key results in hook receiving messages: up arrow key pressed, up arrow key pressed, up arrow key released, up arrow key released, right arrow key pressed, right arrow key pressed, right arrow key released, right arrow key released.

    Is this a bug or am I doing something wrong? Is there a way to prevent this behaviour?

    Sunday, April 28, 2013 7:26 PM