Maybe you should use a Custom WPF Control that mimics a keyboard like, WPF Touch Screen Keyboard because working from a managed enviroment like .Net to the nativw Windows API is a bit difficult.
Also have you tried a Windows 8 Metro application I think in there is trasparent to the programmer the use of keyboard.