Warning: Constant ABSPATH already defined in /homepages/6/d193810287/htdocs/xenobeat/wp-config.php on line 21
Shift Key Footswitch | Electronic Musing
Warning: Undefined variable $show_stats in /homepages/6/d193810287/htdocs/xenobeat/wp-content/plugins/stats/stats.php on line 1384

Shift Key Foot Pedal

Monday, November 18, 2013 at 1:31 am

Shift Key via Footswitch

Recently, I moved. Re-building my setup in a differently-shaped space has caused me to evaluate things much more consciously. I found myself coming back to an idea I’d had a year or two ago: Foot pedals for the computer. My wrists go carpal mashing the shift key while coding or playing games, while my feet are doing absolutely nothing. Why not?

On looking at what the market offered, all I found was bad news: There were indeed USB pedals, but every one of them got terrible reviews. Not because of the pedal, but because of the drivers & software — many of them wouldn’t even let you hold a key down. Like, you’d hold down the pedal, and it would just press the key briefly instead of keeping it held down — useless! No one crouches for 0.3 seconds in counterstrike and lives. So, I shelved the idea and forgot about it, until now.

While sorting out my electronics junk after the move, I found my bin of old computer keyboards. It hit me: Why not just chop up one of these, and add a jack for a footswitch? I mean, it’s a keyboard already. There will be no driver issues; all I have to do is run a wire to the key, right?

Wellll… not quite. It was a bit more complicated than that.

More below the cut.

These things always tend to snowball, so it pays to start simple and cheap. I decided to hack up a PS/2 keyboard first, just so I wouldn’t have wasted a USB keyboard if things didn’t pan out. Here is the “donor keyboard”:

Donor Keyboard
First step: Take it apart!

 

Donor Keyboard (Back Removed)
Keyboard controller and grounded metal backplate.

 

Donor Keyboard (Membrane Layer)
Keyboard controller and membrane sandwich layer.

 

Donor Keyboard (Membrane Layers)
There are three layers: Top (wiring+contacts), Middle (blank, just a separator), and Bottom (more wiring+contacts). When you press a key, it presses the top and bottom layer together slightly, triggering the keypress.

 

Keyboard Controller
The little silicone-coated nipples inside the domes push into the membrane sandwich to trigger a key. The actual keys sit on top of the domes. All the wiring goes into a wee little controller board, with a single keyboard controller IC.

 

Keyboard Controller IC

Peeling off the sticker reveals the actual make and model of the chip: An 83C51KB keyboard controller. I found a datasheet for it on the Internet, but it was not particularly helpful: It did not describe any sort of mapping from the pins to the keys at all. So, unfortunately, that meant I had to sit there for ages and map it out myself.

 

Membrane Layer Mapping

I used colored sharpie to map keys to pins. I had hoped there would be some sort of sensible pattern I could pick up on, but no such luck. I gather this was designed algorithmically: A computer auto-generated the wiring layout. As such, it makes absolutely no sense to a human. I mapped out most of the meta keys (alt, ctrl, backspace, enter, esc, etc) in addition to shfit, just in case I want to add those later. Decided to stay simple for now and just go for shift, though!

 

Adding Switch Jack To Keyboard Controller
Soldier up a jack to the relevant pins. Only wound up taking two of the four I thought I’d originally need. I’m guessing Shift has redundant connections because it’s often used in combo with other keys. No need to worry about that for now, as the whole shebang will now be a giant shift key.

 

Testing -- What A Mess
I always make a huge mess hacking hardware on Saturday night.

Spent a while fiddling around with the board and a “sacrificial lamb” grade ancient desktop, in case it was in the mood to fry things. Wound up needing to add in a diode to keep it from acting flaky. Not really sure why the diode fixed it; I credit trial and error. Pretend you don’t see the finished box, there — I forgot to take a photo before boxing it up. 🙂

 

Assembling Keyboard Controller Into Project Box
Boxing it up… I liked that little ferrite choke, so here’s a picture.

 

Assembled Footswitch Controller
Final shot before putting on the back lid. Added a strain relief — important, as this is destined to be a hockey puck that’ll get lost behind my desk.

 

Shift Footswitch Box
Tada!!

 

Shift Key via Footswitch
And, again, the full setup.

 

It works beautifully (so far). Only real fly in the ointment is the footswitch itself, which doesn’t have particularly good action. But, hey, just need to get a better one and plug it in. 🙂

Now that I know the concept works, and I’ve worked out the bugs, I intend to do a USB one at some point — with multiple keys, not just shift. For now, however, my unused PS/2 port has been transformed into a shift port! I can shift with my feet, as god intended… glorious.

Categories: articles, circuit bending / SDIY, gear, studio, Uncategorized

Post a Comment


Warning: Undefined variable $user_ID in /homepages/6/d193810287/htdocs/xenobeat/wp-content/themes/the-content-blue/comments.php on line 101