Re: How can I change/remap keys from inside my keyboard hook? (I've been searching all day...)

From: Thaddy de Koning (thaddy_at_replacethiswithmyfirstname.com)
Date: 01/14/05


Date: Fri, 14 Jan 2005 09:18:40 GMT

You can not use messages, because you would fall back into the hook thus
creating an endless loop.
You should map the whole keyboard and xlat them into YOUR keyboad lay
out ( do it just once when the hook is installed) and look up from the hook.
The thins you need are the win32 api GetKeyboardstate and
SetKeyboardstate. These use very easy to handle arrays so it isnt
difficult at all



Relevant Pages

  • RE: Problem Overriding Word menu items using VSTO 2005... Shortcuts no
    ... The code that you've implemented essentially allows you to hook the click ... event of the Paste button, however, using the CTRL+V keyboard shortcut to ... execute the paste would not execute the click event of the Paste menu item ... override the CTRL+V shortcut. ...
    (microsoft.public.vsnet.vstools.office)
  • Re: Intellectual Property Protection
    ... I can just pop up the character map (or any other onscreen keyboard) and type whatever I want. ... It seems to me that what I should do is hook the keyboard, ... and compare it to a database of copyrighted works. ... Blanking one makes the use compliant with the license. ...
    (microsoft.public.development.device.drivers)
  • Re: Hook Api
    ... Here's an implementation of a Keyboard hook. ... Public Function KeyboardProc(ByVal nCode As Long, ... Friend Sub KeyHandler(ByVal nCode As Long, ...
    (microsoft.public.vb.winapi)
  • Re: WH_KEYBOARD_LL not capture all key events
    ... I use a global hook because I think there is ... the only way to capture all keyboard input events. ... Thank you very much Paul, ...
    (microsoft.public.windowsce.app.development)
  • Re: Hooks
    ... If you've declared the hook procedure as you have, ... the pointer before passing it to SetWindowsHookEx(). ... If you tell us, again, why you are trying to capture all mouse and keyboard ... > write these types of drivers? ...
    (microsoft.public.windowsce.embedded.vc)