tags:

views:

28

answers:

1

I'm creating a utility for my mother-in-law in order to remap CTRL-C and CTRL-V commands to one signal button on her keyboard to assist with at home work. On the first press it will commit a COPY command. Next press will be a PASTE command. Since my little application won't be in focus I'll need the use of GetAsyncKeyState. Right now I'm attempting to map this all to the tilde key. How do I kill the tilde key from actually passing to the field selected and overwriting the data or appending itself to the pasted text? Could either use C# in any .NET framework or VB6 for this little applet.

I understand the answer I'm looking for could assist in creating malicious software so if anyone should feel the need to not share or delete this question then by all means do so. I'm looking for an answer to a real issue or situation. I know I could map to a none typing key like Scroll Lock or Caps Lock like some other utilities out there but both of these keys are used at this point in time and not quite an option.

+1  A: 

You going to have to do a global keyboard hook (see VBAccelerator for some details on global hooks in VB6), and then not pass on the message once you have received CTRL-V or CTRL-C and then act on that.

Kris Erickson