none
can i make new virtual keyboard and hook it with c# program to sendkey useing it ? RRS feed

  • Question

  • as the title

    can i make new virtual keyboard and hook it with c# program and use sendkeys or PostMessage or SendInput or Input Simulator but from it.

    i think it's possible but i have no knowledge about KMDF or UMDF

    if yes

    what websites or guides i can use ?

    for more info about what i want to do

    let's say i want to make virtual Device and hook it with touch keyboard (keyboard on the screen) and i want the keyboard work directly on the device not only send key through the program etc

    Thursday, September 8, 2016 10:54 AM

Answers

  • you can create a virtual keyboard with a UMDF HID driver. The driver will be written in C or C++, either is fine. C# is not an option. Not sure how you will want to control the driver so you can inject input from application, but to do so you will need to report and additional custom top level collection (TLC) in your HID descriptor that will give you a control channel. You need the additional TLC because the system opens the keyboard stack exclusively and you need some way to talk to the driver outside of the keyboard device itself

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, September 8, 2016 6:19 PM

All replies

  • I think what you are asking is if you can create a virtual keyboard entirely from C# and use sendkey as the way to simulate keypresses. Normally, the use of the word "hook" is to intercept some data in the stream and alter it in some way. Why is the built in on screen keyboard not sufficient? having an on screen keyboard work across all applications that properly handles focus, input routing, etc, is extremely difficult and has many corner cases

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, September 8, 2016 4:39 PM
  • the normal keyboard on screen as the windows 10 touch keyboard not work on a lot of games

    so i want to make virtual keyboard Device and control it with a program

    not c# specifically

    any language that it can give me what i need

    but i said c# as Example

    Thursday, September 8, 2016 5:04 PM
  • you can create a virtual keyboard with a UMDF HID driver. The driver will be written in C or C++, either is fine. C# is not an option. Not sure how you will want to control the driver so you can inject input from application, but to do so you will need to report and additional custom top level collection (TLC) in your HID descriptor that will give you a control channel. You need the additional TLC because the system opens the keyboard stack exclusively and you need some way to talk to the driver outside of the keyboard device itself

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, September 8, 2016 6:19 PM