Remaping Keys of the system?

Hi!

I intend to make a program, which intercepts keystrokes (from the number pad) reassigns them, and sends them to the system.
IE. when I hit the + Key on the number pad, it should act like the s key.
The goal of this would be a "remote control" for a media pc with only the number pad on it.
Now, I have no idea how to "intercept" keys... read something about virtual keys and read in the MS library... there is even a code to display keytrokes... but this is way to high for me... couldnt even get it to work.
My experience in c++ is very limited, Im more the java type, but I someone told me java could not really intercept keystrokes on a systemlevel.
So, does somebody know how to do this and could explain it?
thx :)

Comments

  • : Hi!
    :
    : I intend to make a program, which intercepts keystrokes (from the number pad) reassigns them, and sends them to the system.
    : IE. when I hit the + Key on the number pad, it should act like the s key.
    : The goal of this would be a "remote control" for a media pc with only the number pad on it.
    : Now, I have no idea how to "intercept" keys... read something about virtual keys and read in the MS library... there is even a code to display keytrokes... but this is way to high for me... couldnt even get it to work.
    : My experience in c++ is very limited, Im more the java type, but I someone told me java could not really intercept keystrokes on a systemlevel.
    : So, does somebody know how to do this and could explain it?
    : thx :)

    For Win32 system, try function SetWindowsHookEx(...). The idea is to install your own keyboard message handler to the message chain, capture the keyboard messages and do whatever you want. Hope this helps.

    Leo
  • : : Hi!
    : :
    : : I intend to make a program, which intercepts keystrokes (from the number pad) reassigns them, and sends them to the system.
    : : IE. when I hit the + Key on the number pad, it should act like the s key.
    : : The goal of this would be a "remote control" for a media pc with only the number pad on it.
    : : Now, I have no idea how to "intercept" keys... read something about virtual keys and read in the MS library... there is even a code to display keytrokes... but this is way to high for me... couldnt even get it to work.
    : : My experience in c++ is very limited, Im more the java type, but I someone told me java could not really intercept keystrokes on a systemlevel.
    : : So, does somebody know how to do this and could explain it?
    : : thx :)
    :
    : For Win32 system, try function SetWindowsHookEx(...). The idea is to install your own keyboard message handler to the message chain, capture the keyboard messages and do whatever you want. Hope this helps.
    :
    : Leo
    :


    And how is this capturing of keyboard messages done? I never used something like this in c++.. I only used basic stuff.
  • : : : Hi!
    : : :
    : : : I intend to make a program, which intercepts keystrokes (from the number pad) reassigns them, and sends them to the system.
    : : : IE. when I hit the + Key on the number pad, it should act like the s key.
    : : : The goal of this would be a "remote control" for a media pc with only the number pad on it.
    : : : Now, I have no idea how to "intercept" keys... read something about virtual keys and read in the MS library... there is even a code to display keytrokes... but this is way to high for me... couldnt even get it to work.
    : : : My experience in c++ is very limited, Im more the java type, but I someone told me java could not really intercept keystrokes on a systemlevel.
    : : : So, does somebody know how to do this and could explain it?
    : : : thx :)
    : :
    : : For Win32 system, try function SetWindowsHookEx(...). The idea is to install your own keyboard message handler to the message chain, capture the keyboard messages and do whatever you want. Hope this helps.
    : :
    : : Leo
    : :
    :
    :
    : And how is this capturing of keyboard messages done? I never used something like this in c++.. I only used basic stuff.

    Capturing keyboard message is very basic. Actually, capturing any windows message is the heart of all Windows-based programs. Sounds to me you have no experience in writing Windows-based programs in C++, right?
    I suggest you learn first and then try to achieve your goal.



    Greets,
    Eric Goldstein
    http://www.gvh-maatwerk.nl


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories