I always like to use the original controls in my projects as far as possible, and with an embarrassment of buttons to choose from on this VCR I looked forward to the possibilities. I started by removing the two button circuits from the case, then with a 5v LED and breadboard mapped out which wire was which, labelling them as I went. This was greatly helped by the boards being well commented, displaying both the switch names and the route of the cable on the upper side. The circuits were straightforward enough, basically just a cable for each button and a shared negative connection.

This was about when the trouble started! I wanted to use as many buttons as possible, for media control (play/pause etc), Raspbmc navigation and other functions like TV, EL wire, LEDs etc. To do this I figured I could just cannibalise an old USB keyboard, cable up the connectors and away I'd go - it didn't really work out that way.

Firstly I sliced up an old flexible USB keyboard, fixing the button cables to the connectors that usually touch when you press a key, so that the VCR buttons would send keystrokes to the Pi, which could then be mapped to control functions. This worked up to a point, but the number of connections (16 buttons, 32 cables) meant it took ages to put together. After testing it with a PC I found that the connections weren't as reliable as I'd hoped (I tried everything from stapling, hole poking, paperclips and hot glue to geomag magnets to connect to the keyboard!). I gave up on the keyboard as too complicated in the end - too much to go wrong - and instead had the idea that maybe I could use an arduino uno to imitate a keyboard. Having had that idea and investigated a bit I realised that the Pi itself has a set of GPIO pins, which could potentially be used to interface directly with the VCR buttons.

I spent quite a while experimenting with various options, learned a lot about GPIO pins, pull-up resistors and other stuff, and came very close to a solution with some Pi code called Pikeyd, but hit a bit of a brick wall with it in the end. Next I tried an Adafruit Trinket, a teeny-tiny microcontroller, but after a lot of time spent tinkering it proved to only really offer a couple of input buttons. I had similar luck with the USB gamepads I had lying around. By now several weeks had passed and the rest of the project, the case, TV etc were nearing completion, so I decided it was make-or-break for the buttons!

Thinking about the finished product and with the other components almost ready I took a step back and realised that space was going to be much tighter inside the case than I'd thought. Also that it would actually be of limited use having a full set of navigation and control buttons on the VCR itself, because when viewing the screen the buttons would be facing away from you! I decided on one last effort to salvage some basic functions (Play/Pause, Rewind and Fast Forward) and got this working with the circuit of one of the lowliest creatures on earth - a USB mouse from the £1 shop.

The mouse was dismantled very easily and I wired in the switches for left, right and middle click to the VCR buttons. All I needed to do then was to edit an XML file on the Pi called keymaps.xml - this tells the Pi what functions to perform, for example I mapped LeftClick to the Raspbmc function for Rewind, MiddleClick to Play/Pause and RightClick to FastForward. I left all of the wires to the other buttons labelled up and tucked away in the case so that I can revisit other options at a later date if I need to.

Getting the buttons sorted was the most time-consuming and frustrating part of this build, and in the end I made a compromise for the sake of moving forward and keeping it fun. I did manage to make the VCR buttons control the EL wire, LEDs, Eject and TV on/off, so in the end I'm pleased with how it worked out.