Maker Pro
Maker Pro

configuring hardware key with pc

jishnu1985

Aug 9, 2012
2
Joined
Aug 9, 2012
Messages
2
hai,

I am having a visualization software made in C#.net, which displays a set of images needed for work on pc. the only button assigned for this software is "Next" and we use mouse to click NEXT button to see the next image in that software. Presently we use mouse to do the clicking. Now i need to produce a single switch hardware, which can be used instead of mouse. so that when i click on this switch, the NEXT button will work on pc. Connectivity i wish between the switch and pc is through USB. Any other methods of connectivity is also welcomed. How can this be acheived. Is there any hardware available or any circuit diagram like this. Please help.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Make the "next" button the default action so you can use the "Enter" key of a conventional keyboard.

Connect the pushbutton in parallel to the "Enter" button of the keyboard via some wire. Hide the keyboard.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
If the 'Next' button is the only active control that Windows sees then it will have the focus. As Harold said the 'Enter' key will then be active. The 'Space Bar' key should also work and is much bigger and more convenient.
 

jishnu1985

Aug 9, 2012
2
Joined
Aug 9, 2012
Messages
2
Make the "next" button the default action so you can use the "Enter" key of a conventional keyboard.

Connect the pushbutton in parallel to the "Enter" button of the keyboard via some wire. Hide the keyboard.

Thanks Mr. Herald Kapp your suggestions were most valuable. But what if there is something around 50-60 meters between PC and the machine? will such a parallel connection from Keyboard work?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
It will work, but will be very unreliable and prone to noise. In that case, you should at least decouple the remote button from the keyboard by an isolating mechanism.
You could, for example, use a photocoupler. Connect the transistor of the photocoupler across the "Enter" key's contacts (observe polarity or use a photomos relay if uncertain about polarity). Put a current limiting transistor in series with the LED of the photocoupler. Attach button plus a voltage source (battery) to the LED such that the LED wil light up when the button is pressed (you can''t see this, the LED is enclosed within the photocoupler). Now by pressing the button the LED will light up, ths making the transistor in the photocoupler conductive and simulate pressing the "Enter" key.
 

dahhal

Jul 17, 2012
58
Joined
Jul 17, 2012
Messages
58
In light of the new 50 / 60 meter requirement, it may be best to skip the keyboard idea, and make use of a embedded device just as an arduino or raspberry pi that has General Purpose through ethernet to the c# application can respond to and web request and call the function that you do if you were to press next. It could also have the advantage to make the application become focused (in case any pop ups or anything stole focus) when the button is pressed, or focus could be another button all together.
 

dahhal

Jul 17, 2012
58
Joined
Jul 17, 2012
Messages
58
hehehe. more expensive though could be fun.

Harald I think I misunderstood your description.

Did you describe instructions to extend the entire keyboard 60 meters. Or just a single pair of wires to turn the led on. The second option doesn't seem so bad at second read as you could just use a single strand of twisted pair to power the led.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
I was talking just about a single pushbutton as "remote control" for the "Enter" key.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I don't like the idea of hard wiring directly into the keyboard "Enter" key circuit. Does your mouse have to be over the "Next" button to click it or can it be anywhere in that window?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
The photocoupler, as I suggested, will decouple the remote button from the keyboard.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I don't like the idea of hard wiring directly into the keyboard "Enter" key circuit. Does your mouse have to be over the "Next" button to click it or can it be anywhere in that window?

Actually, I was going in a plug and play (mouse click circuit) direction, which is why I asked this. You're OptoCoupler would still be used. On the other hand keyboards are dirt cheap, so I guess tapping into the Enter key is no biggy.

Chris
 
Top