I think following post should be an answer to your question,
How do i send keys using a global keyboard hook?
According to the answer, you have to use following key codes to the SendInput function,
http://www.gamespp.com/directx/directInputKeyboardScanCodes.html