This project is inspired by several existing really creative Easy Button hacks I've seen on Instructables.  This one is a bit cheaper than the others.  It's not wireless, nor a game show, and takes a little more work, but it'll get you going quickly :-)

Step 1: Tools and Parts

I used the Teensy 2.0, available directly from them or from Adafruit for $20.  It's got USB support built in, and can be programmed using the Arduino IDE or directly with avr-gcc as you prefer.  We'll be using the Arduino IDE, so install that and TeensyDuino.

We will program the Teensy to send a unique keystroke combination, Meta-Alt-Control-W, that will be intercepted on the computer - for Windows you can use AutoHotkey, for Mac you can use QuickSilver, and for Linux you can set it up directly in the Window Manager's preferences using xev or keytouch.

You'll need to do a little scripting, but the Lifehacker links I used above have many common script libraries to get you started.

Finally, you'll need an Easy Button.

For tools you'll need a P0 or P1 philips screwdriver, a soldering iron, and about a foot of hookup wire.  A coping saw or hacksaw is helpful for cutting the hole for the usb port into the side of the button, but a pair of pliers will do just fine with the relatively soft plastic, it will just look a bit more ragged.  Not pictured are an xacto knife or small flat screwdriver, and a wire cutter/stripper.

Disclaimer:  I'm not affiliated with Microsoft, Apple, PJRC, Adafruit, Lifehacker, Quicksilver, Autohotkey, nor Staples.  I just like their products and used them in this Instructable.

Any soldering or other hacking is at your own risk.
<p>I made one! Although I used an Adafruit Trinket instead of a Teensy (it is much cheaper and just as easy). Instructions for the Trinket software are here; <a href="https://learn.adafruit.com/trinket-usb-keyboard?view=all" rel="nofollow">https://learn.adafruit.com/trinket-usb-keyboard?vi...</a> </p><p>Read here how to set up Arduino IDE for the Trinket; <a href="https://learn.adafruit.com/introducing-trinket/setting-up-with-arduino-ide" rel="nofollow">https://learn.adafruit.com/introducing-trinket/set...</a></p><p>My code;</p><p>#include &lt;TrinketKeyboard.h&gt;</p><p>#define EASY_BUTTON 0</p><p>void setup()</p><p>{</p><p> pinMode(EASY_BUTTON, INPUT);</p><p> digitalWrite(EASY_BUTTON, HIGH);</p><p> TrinketKeyboard.begin();</p><p>}</p><p>void loop()</p><p>{</p><p> TrinketKeyboard.poll();</p><p> if (digitalRead(EASY_BUTTON) == LOW)</p><p> {</p><p> // Available keys and their commands; https://github.com/adafruit/Adafruit-Trinket-USB/blob/master/TrinketKeyboard/TrinketKeyboard.h</p><p> TrinketKeyboard.pressKey(0, KEYCODE_F10);</p><p> TrinketKeyboard.pressKey(0, 0);</p><p> delay(500);</p><p> }</p><p>}</p>
<p>quick question - bought a trinket 5v in my attempt to replicate.. </p><p>did you use the 3.3v or the pro instead?</p><p>power wise should it use the usb connection for power or the batteries (apologies as I havent gone through the tutorial yet - I will be receiving the hardware tomorrow)?</p>
<p>I made it ! Works great. I zip tied the Teensy to the speaker holes and programmed it to trigger my backup script. Not bad for my first microcontroller project.</p>
Great Instructable! My wife wanted me to make her a button that she could press to open a new internet window easily. I used your code and wiring guide to re-purpose an antique Telegraph Key to do this. Works great. Thanks.
<p>That is so cool!!!</p>
You can do it, Vinny! Also this looks like a lot of fun, I think I'll try it later. =)
so you can get this to preform any task? like open a program, etc? It's kind of hard to see in your video, what does the widow that pops up say?
Oh the popup window says &quot;There, that was easy&quot; :-)
Hi Amanda,<br>Yeah, on the mac Quicksilver is quite flexible - I'm using an Applescript, which has hooks into most mac programs, but you could use a shell or any executable file too. The mailcount script (attached to the instructable), for example, will start the Mail.app if it's not running, and I have scripts that will send messages also.<br>I played a bit with AutoHotKeys on Windows, which seems to have about the same capabilities. It can start apps, click buttons on windows, pop up dialogs, play sounds, etc.

About This Instructable



More by rmd6502:Creating a Bluetooth wireless scrollwheel How to make a charlieplexed LED heart How to 3D print a solder stencil! 
Add instructable to: