The USB foot switch should work with Windows, Linux, or Mac from the last few years (with plug and play, which has been around for quite a time).  When you plug in the USB cord, the computer will detect something is plugged in but it will not know it's the switch until the Trinket boot code finishes timing out in a few seconds. Then your operating system device list will show a keyboard device entitled "Trinket Keyboard".

Place the switch part in a comfortable position.  When the switch is activated by a foot press, the keycodes and/or text you have programmed will be output into the current window (the one with the focus in operating system speak).  So if you have a word processor and are typing text and the switch is programmed to type your name, it will output the characters for your name.  If you have an email program open and activate the switch, it outputs your name.  If you have a web broswer form open, it'll output your name, you get the idea.

As programmed in the example,  the switch will output the special keyboard code for Windows PCs (and only Windows machines) to place a copy of the displayed screen graphics into the Windows clipboard.  This is something authors or other content creators do frequently.

If you have a Linux machine or Mac, the screen capture keycode is probably something else. No worries, do an online search for the key action you want for your operating system.  Replace the keycodes into the Arduino code and upload to the Trinket.

This guide was first published on Jan 20, 2015. It was last updated on Jan 20, 2015. This page (Use) was last updated on Jul 15, 2019.