Building an input device to send a specific keystroke (or se

Guest
I want to build a device (ideally USB) that functions as a keyboard,
to an extent. I don't want it to have all the keys however. There is a
particular application that requires only a single key: scroll lock. I
want to set it up as a sort of hand-held clicker.

Long story short, this is designed to interface with a time keeping
program. When someone crosses the finish line, the timekeeper
currently holds Function-Scroll Lock which gets kind of annoying. I
had envisioned something a little better for the poor guy, basically a
push button that connects to the computer and sends the scroll lock
code to the computer via USB.

I'm not a newb to electronics, it's just been many years since I've
taken on any project and I've never done anything with keyboards or
computer interfaces before. Does anyone know of some references I can
use to get this off the ground, or if there are details of a similar
project out there somewhere? I did an initial google search that
didn't return much.
 
On Wed, 21 May 2008 09:08:13 -0700, fny1182 wrote:

I want to build a device (ideally USB) that functions as a keyboard,
to an extent. I don't want it to have all the keys however. There is a
particular application that requires only a single key: scroll lock. I
want to set it up as a sort of hand-held clicker.

Long story short, this is designed to interface with a time keeping
program. When someone crosses the finish line, the timekeeper
currently holds Function-Scroll Lock which gets kind of annoying. I
had envisioned something a little better for the poor guy, basically a
push button that connects to the computer and sends the scroll lock
code to the computer via USB.

I'm not a newb to electronics, it's just been many years since I've
taken on any project and I've never done anything with keyboards or
computer interfaces before. Does anyone know of some references I can
use to get this off the ground, or if there are details of a similar
project out there somewhere? I did an initial google search that
didn't return much.
Hack the keyboard itself, and put a spst switch in parallel with
the "scroll lock" contacts.

Or alternatively, you could completely hack a keyboard into an input
device, a la;
http://www.neodruid.net/KeyZilla
and put a smart Y connector to arbitrate.

Good Luck!
Rich
 
On Wed, 21 May 2008 09:08:13 -0700, fny1182 wrote:

I want to build a device (ideally USB) that functions as a keyboard, to
an extent. I don't want it to have all the keys however. There is a
particular application that requires only a single key: scroll lock. I
want to set it up as a sort of hand-held clicker.

Long story short, this is designed to interface with a time keeping
program. When someone crosses the finish line, the timekeeper currently
holds Function-Scroll Lock which gets kind of annoying. I had envisioned
something a little better for the poor guy, basically a push button that
connects to the computer and sends the scroll lock code to the computer
via USB.
Hacking the keyboard is the simplest approach, just a SPST switch and
some cable. If you don't want to hack into the computer, Micro Chip and
Atmel make microcontrollers that include USB interfaces. This may look
like massive overkill for one key, but some of these chips are absurdly
inexpensive.
 
On Wed, 21 May 2008, Stephen J. Rush wrote:

On Wed, 21 May 2008 09:08:13 -0700, fny1182 wrote:

I want to build a device (ideally USB) that functions as a keyboard, to
an extent. I don't want it to have all the keys however. There is a
particular application that requires only a single key: scroll lock. I
want to set it up as a sort of hand-held clicker.

Long story short, this is designed to interface with a time keeping
program. When someone crosses the finish line, the timekeeper currently
holds Function-Scroll Lock which gets kind of annoying. I had envisioned
something a little better for the poor guy, basically a push button that
connects to the computer and sends the scroll lock code to the computer
via USB.

Hacking the keyboard is the simplest approach, just a SPST switch and
some cable. If you don't want to hack into the computer, Micro Chip and
Atmel make microcontrollers that include USB interfaces. This may look
like massive overkill for one key, but some of these chips are absurdly
inexpensive.

I don't know what it's like with USB keyboards (I've never had one, so I
can't look inside) but at least some PS/2 keyboards I've opened have a
nice small circuit board, separate from the matrix board for the actual
keys. Those then make it really easy to make a custom keyboard or
whatever, since it's really easy to extract the small board.

Of course, in the old days, this sort of thing would most easily be
done with the use of a parallel input board, or even one of the control
lines on a serial board. It does require adapting software to look
for the keypress on the serial or parallel board, and these days it
seems like serial interfaces are not standard in computers, maybe not
even parallel printer ports these days.

If the software can be modified, the most easily accesible thing
nowadays may be the mouse, in effect a USB interface that can take
a number of on/off inputs.

Michael
 
On 21 May, 17:08, fny1...@rofl-online.com wrote:
I want to build a device (ideally USB) that functions as a keyboard,
to an extent. I don't want it to have all the keys however. There is a
particular application that requires only a single key: scroll lock. I
want to set it up as a sort of hand-held clicker.

Long story short, this is designed to interface with a time keeping
program. When someone crosses the finish line, the timekeeper
currently holds Function-Scroll Lock which gets kind of annoying. I
had envisioned something a little better for the poor guy, basically a
push button that connects to the computer and sends the scroll lock
code to the computer via USB.

I'm not a newb to electronics, it's just been many years since I've
taken on any project and I've never done anything with keyboards or
computer interfaces before. Does anyone know of some references I can
use to get this off the ground, or if there are details of a similar
project out there somewhere? I did an initial google search that
didn't return much.
My suggestion is not along the lines you are thinking about at all..
Since it's purely a computer DIY solution rather than an electronics
one.

Attach an external keyboard to the computer*laptop?) he is using. So
you have a separate scroll lock key . No need for an Fn key

Now rip off all the keys leaving just the scroll lock key.

The only disadvantage is it is a small button, but that's no big deal.

So there you have it, your device with a single button.

It would be a relatively big keyboard he would carry around.. just for
a tiny little button!!!
But maybe with your electronic skills, you could hack it into
something smaller! Or with some delicate DIY, maybe hack the button
into something bigger!

Another solution may be the ext keyboard, and also to use software to
remap every key to scroll lock.. or all Function Keys as in F1-12 To
scroll lock. If that's possible to map many keys to one key. But I
think the above solution of just a keyboard with scroll lock key, is
pretty good.
 
On Thu, 22 May 2008, fny1182@rofl-online.com wrote:


By the way I should mention that USB is preferable, but I guess I
really don't need to do it that way -- it can be PS/2. I took apart a
USB keyboard and it seems to be a lot different so I'm not sure where
to even begin testing that one.

I think it's more likely that different keyboards use a different layout
than a difference between USB and PS/2 keyboards.

Some keyboards will have one single large board, with the actual circuitry
and the keyboard matrix, and those will be less suitable for your project.
Others will have a small board off in a corner, that is easy to extract
and all that you need to figure out is where to connect the button you
want so it is in the right place to be the button you want.

The difference is merely a design decision. At this point, there USB
and PS/2 will be basically a single IC or at most a couple of smaller
ICs added to a large IC.

Michael
 
One of the reasons the clicker idea is a consideration is because it
could have a long cable so that staff wouldn't even need to be in
front of the computer at all. They could be standing in the window and
quickly/easily click something in their hand every time a horse
crosses the line.

I want to thank everyone for their assistance so far, by the way. Lots
of good suggestions. I popped open a crappy Dell PS/2 keyboard I had
laying around and took a look. Maybe it's because I haven't messed
with this stuff in a long time, or maybe because it legitimately
exceeds my experience, but I'm not really sure how to proceed. I do
admit that I got a little confused looking over some of the resources
I was referred to. This particular keyboard has the interlocking "C"
shaped contacts for the keys, and has a Silitek KMMPA40604 chip on the
board. I tried to find info on this chip but had no success. I
uploaded a picture so you can see what I'm looking at:
http://www.rofl-online.com/images/kb_photo.jpg

I have a USB keyboard pulled apart too. It definitely looks a lot
different. I'm sure neither solution is nearly as complicated as it is
appearing to me now, but I'm definitely a little confused as to how
this thing works exactly and what I need to do to send the scroll lock
key.

Anyhow, I'm not fully certain as to how to test the keyboard because I
don't think it's working out like it's supposed to. One thing I
referenced was http://www.mameworld.net/emuadvice/keyhack2.html. It
mentions testing for a full scale deflection, which is a term I'm not
familiar with. I don't have my really nice Snap-On DMM anymore, but
the cheap little Radio Shack one I have ought to do fine for this. :)
If I'm reading it right, I label the pins on my spreadsheet from 1-8
across the top, and 1-16 down the left. I need to test the keyboard by
keeping one probe on each "C" for the key and run the other probe down
the pin strip going to the card until I get find continuity between
the key's contact and a pin. On the bottom "C" I get a reading on pin
7, and top "C" on pin 9... but they're both on the right most group of
pins (the 1-16 range). I thought one should read on the 1-8 group, and
the other on the 1-16 group?

Hopefully this makes sense -- I wrote it as I went along and changed
it a few times in the process. lol.
 
On May 22, 10:12 am, fny1...@rofl-online.com wrote:
One of the reasons the clicker idea is a consideration is because it
could have a long cable so that staff wouldn't even need to be in
front of the computer at all. They could be standing in the window and
quickly/easily click something in their hand every time a horse
crosses the line.

I want to thank everyone for their assistance so far, by the way. Lots
of good suggestions. I popped open a crappy Dell PS/2 keyboard I had
laying around and took a look. Maybe it's because I haven't messed
with this stuff in a long time, or maybe because it legitimately
exceeds my experience, but I'm not really sure how to proceed. I do
admit that I got a little confused looking over some of the resources
I was referred to. This particular keyboard has the interlocking "C"
shaped contacts for the keys, and has a Silitek KMMPA40604 chip on the
board. I tried to find info on this chip but had no success. I
uploaded a picture so you can see what I'm looking at:http://www.rofl-online.com/images/kb_photo.jpg

I have a USB keyboard pulled apart too. It definitely looks a lot
different. I'm sure neither solution is nearly as complicated as it is
appearing to me now, but I'm definitely a little confused as to how
this thing works exactly and what I need to do to send the scroll lock
key.

Anyhow, I'm not fully certain as to how to test the keyboard because I
don't think it's working out like it's supposed to. One thing I
referenced washttp://www.mameworld.net/emuadvice/keyhack2.html. It
mentions testing for a full scale deflection, which is a term I'm not
familiar with. I don't have my really nice Snap-On DMM anymore, but
the cheap little Radio Shack one I have ought to do fine for this. :)
If I'm reading it right, I label the pins on my spreadsheet from 1-8
across the top, and 1-16 down the left. I need to test the keyboard by
keeping one probe on each "C" for the key and run the other probe down
the pin strip going to the card until I get find continuity between
the key's contact and a pin. On the bottom "C" I get a reading on pin
7, and top "C" on pin 9... but they're both on the right most group of
pins (the 1-16 range). I thought one should read on the 1-8 group, and
the other on the 1-16 group?

Hopefully this makes sense -- I wrote it as I went along and changed
it a few times in the process. lol.
By the way I should mention that USB is preferable, but I guess I
really don't need to do it that way -- it can be PS/2. I took apart a
USB keyboard and it seems to be a lot different so I'm not sure where
to even begin testing that one.
 
On Thu, 22 May 2008 07:12:53 -0700, fny1182 wrote:

uploaded a picture so you can see what I'm looking at:
http://www.rofl-online.com/images/kb_photo.jpg
http://mysite.verizon.net/richgrise/KeyZilla/

Have Fun!
Rich
 
"Bob Masta" <NoSpam@daqarta.com> wrote in message
news:4836b216.1106393@news.sysmatrix.net...
On Thu, 22 May 2008 07:12:53 -0700 (PDT), fny1182@rofl-online.com
wrote:

One of the reasons the clicker idea is a consideration is because it
could have a long cable so that staff wouldn't even need to be in
front of the computer at all. They could be standing in the window and
quickly/easily click something in their hand every time a horse
crosses the line.

Another approach you might consider is to use the sound card input
lines with a switch that connects to a 1.5V battery. (Also requires a
bleeder for when the switch is open, since the sound card is AC
coupled.)

The advantage of this is that it can be accurate to one sample period
(20.8 usec at 48000 Hz), whereas anything keyboard related goes
through the normal Windows message queue and could have a latency
of 10s of msec, depending on what else Windows thinks it needs to be
doing at any given instant. (The sound card system is set up to not
miss anything.) However, although this approach will have simple
hardware needs, it will require much more programming effort to
implement.

This approach can easily provide 2 independent inputs, one for each
stereo channel. If you need more than that, you could use a simple
divider with multiple switches, so each switch applies a different
voltage to the input. (Resulting in a different capacitively-coupled
spike amplitude at the sound card.)

Best regards,
I was thinking of suggesting the parallel port, but it sounds like he has a
'stock' application that he can't really modify. So, he'd need to somehow
generate the key input to the application based on some other program
running on the PC. That might not be simple (although it might, I don't
know).

Regards,
Bob Monsen
 

Welcome to EDABoard.com

Sponsor

Back
Top