Home > Back-end >  How to control the usb keyboard, only used in my program? Master see come over...
How to control the usb keyboard, only used in my program? Master see come over...

Time:02-04

USB keyboard, is actually a USB interface card, automatic equipment only simulation into keyboard
In this way, the user by opening a window, you can put the card brush out the contents of the magnetic stripe,

I think I was the only program will accept usb keyboard input, other programs don't take the input of the device,

But no contact with the development of usb, I do not know can do,

As if they only want to be my program in the processing, first contact the Windows usb keyboard input, whether or not my application active, the input is passed on to my program,

Or are there any other method?

Need experts give advice!!

CodePudding user response:

USB keyboard, is actually a USB interface card, automatic equipment only simulation into keyboard
In this way, the user by opening a window, you can put the card brush out the contents of the magnetic stripe,
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Usb card should help provide development and tell use interfaces and rules
You search the product provider's website, or contact the manufacturer

CodePudding user response:

I only think of two methods:
1. Drive way to intercept the keyboard input, judgment of equipment, to perform the corresponding response, this method is not made
2. The keyboard hook, this device can be set up behind the leading character as a semicolon, to enter a newline character at the end, so you judge in the keyboard hook, a very short period of time (& lt; Within 0.5 seconds), input the complete; Card number # 13 # 10 can be considered to be in charge, and then stopped to a specified program, which will use the keyboard buffer, Windows have a function to read.

CodePudding user response:

Or the equipment save trouble, to buy a serial port or standard USB devices, can be the keyboard is not suitable for programming control of mouth, you this is not the problem of USB,

CodePudding user response:

Don't consider change the condition of equipment, now most of the devices are the usb interface, and the customer has bought a large number of this kind of equipment,

I as it is, is to want to let your own system appear more professional, it doesn't, the customer didn't also the opinion,

So we are talking about the technical problems, can realize and the problem of how to implement the

Actually had seen a piece of software has achieved this functionality, but didn't pay attention to at the time, forgot what software

Or is there any way, directly put the shot out of the device, and then directly read the device key, is now the query technology in this field, hope to have this to instruct me,

CodePudding user response:


If the way to convert a usb keyboard to a usb device, you can directly read from the device key, isn't it

CodePudding user response:

With q, any way to convert a usb keyboard to a usb device?

CodePudding user response:

Like this kind of low speed equipment, manufacturers often by driver simulation into other low speed interface, since you swipe device has been modeled as key, just as a normal keyboard to deal with, so, your problem is how to monopolize the keyboard, in Windows DirecX contains a DirectInput part, can make your program monopoly keyboard input,
  • Related