hmm, should be the same as the mouse i would think...
Code:
#define INPUT_KEYBOARD 0x0001
#define KEYEVENTF_SCANCODE 0x0008

typedef struct
{
    WORD wVk;
    WORD wScan;
    DWORD dwFlags;
    DWORD time;
    long dwExtraInfo;
} 
KEYBDINPUT;

typedef struct
{ 
  DWORD type; 
  KEYBDINPUT ki; 
}
INPUT;

int WINAPI SendInput(int nInputs,INPUT* pInputs,int cbSize);
#define PRAGMA_API SendInput;user32!SendInput

///////////////////////////////////////////////////////////////////////

void PressKey (int scan_code)
{
  INPUT Input;
  Input.type  = INPUT_KEYBOARD;
  Input.ki.wScan = scan_code;
  Input.ki.dwFlags =  KEYEVENTF_SCANCODE;
 
  SendInput(1,&Input,sizeof(Input));
}


I don't have time to test this right now, but it looks ok.