Change Key, Virtual Keyboard

How i change?
9 to (
0 to )
[ to {
] to ]

I am making a utilitarian to help to program. I used as an example this: http://www.cplusplus.com/forum/beginner/8806/
But i need to write:
int main()
{
}
But i don't know how turn 9 in (
I need help.... T_T

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <iostream.h>
#include <windows.h>
#include <winable.h>
using namespace std;
HWND janela=FindWindow(0, "Untitled - Notepad");
void GenerateKey(int vk, BOOL bExtended) 
{
    KEYBDINPUT  kb = {0};
    INPUT       Input = {0};
    /* Generate a "key down" */
    if (bExtended) { kb.dwFlags  = KEYEVENTF_EXTENDEDKEY; }
    kb.wVk  = vk;
    Input.type  = INPUT_KEYBOARD;
    Input.ki  = kb;
    SendInput(1, &Input, sizeof(Input));
    /* Generate a "key up" */
    ZeroMemory(&kb, sizeof(KEYBDINPUT));
    ZeroMemory(&Input, sizeof(INPUT));
    kb.dwFlags  =  KEYEVENTF_KEYUP;
    if (bExtended) { kb.dwFlags |= KEYEVENTF_EXTENDEDKEY; }
    kb.wVk = vk;
    Input.type = INPUT_KEYBOARD;
    Input.ki = kb;
    SendInput(1, &Input, sizeof(Input));
    return;
}
#define shift 0x10
#define enter 0x0D
#define po 0x39
#define pc 0x30
#define co 0xDB
#define cc 0xDD
int main()
{
    SetForegroundWindow(janela);
    GenerateKey('I', FALSE);
    GenerateKey('N', FALSE);
    GenerateKey('T', FALSE);
    GenerateKey(' ', FALSE);
    GenerateKey('M', FALSE);
    GenerateKey('A', FALSE);
    GenerateKey('I', FALSE);
    GenerateKey('N', FALSE);
    GenerateKey(po, FALSE);
    GenerateKey(pc, FALSE);
    GenerateKey(enter, FALSE);;
    GenerateKey(co, FALSE);
    GenerateKey(enter, FALSE);
    GenerateKey(cc, FALSE);
    system("PAUSE");
    return 0;
}
Topic archived. No new replies allowed.