Home

TouchPad Support

User Guide

The user guide is provided here for reference.  Many of the sections in it are available in more detail below and can be accessed from the menu on the left.


Getting Started

IMPORTANT *** Before plugging in your TouchPad *** READ THIS
  • When in the programming modes, TouchPad types instructions on the screen.  Before entering these modes make sure you are in a blank text editor, otherwise these keystrokes could edit or delete text or files on your computer!  If TouchPad is typing and you are not in a blank text editor, it is best to unplug TouchPad.

  • When connecting to Mac computers for the first time, a keyboard setup window will appear, this can be closed immediately.

  • TouchPad relies on capacitive touch to detect key presses.  This is calibrated on start up between the power LED blinking and being on.  It is recommended that TouchPad is in the location it will be used and that you do not touch TouchPad during this process.

  • Capacitive touch can be affected by changes in the surrounding environment.  If TouchPad is affected by this and starts malfunctioning, simply remove and reapply power to force a calibration or leave it for 8 seconds, after which a calibration will automatically be performed.


TouchPad Modes

By default, TouchPad is in a Normal operating mode, in this mode:

  • Pressing and releasing keys will cause the assigned keystrokes for the current command set and pressed key to be sent to your device. Keystrokes are sent when you release the key.

  • Pressing and swiping sideways on TouchPad will change the current command set. The display will show the new command set’s pattern until a key is pressed.

The following modes can only be entered upon initial power up (before any keys have been pressed), you should make sure you are in a blank text editor before entering these modes.  If you have already pressed a key you will need to unplug TouchPad and then plug it back in to enter these modes:

  • Pressing and swiping up on TouchPad will enter the pattern programming mode for the current command set, touch keys to toggle them, press and swipe down on TouchPad when you are done.

  • Pressing and swiping down on TouchPad will enter the key programming mode for the current command set. Make the changes you need and then press and swipe up on TouchPad when you are done.


Video Tutorial

This video tutorial will guide you through how to use the On The Go Programmer to assign functionality to keys.  Make sure you have read Getting Started before trying to follow along.



Programming Keys

Before entering programming modes, open a basic text editor such as Note Pad (Windows) or Text Edit (Mac).  It is important ALL characters have the same width.  This is standard in Note Pad on windows but in Text Edit on Mac you will need to go to [Format > Make Plain Text].  We recommend watching the video tutorial ABOVE before trying to program your TouchPad.

In Key Programming mode, the diagram typed out by TouchPad assigns programming functions to TouchPad keys.  To start programming a key, touch the TouchPad key you want to program and use the TouchPad keys corresponding to the menu functions shown on screen to assign functionality.  When you have finished editing that key, return to edit more keys by pressing the top left key or return to Normal operating mode by touching and swiping up on TouchPad.

Factory default: All keys in all command sets have no functionality.


In Pattern Programming mode, only instructions will be typed out.  This mode allows you to configure a defining pattern for the current command set using the key LEDs.  This pattern will be displayed when TouchPad is first plugged in and when you switch command sets.  It will extinguish after the first key press in that command set.  To program the pattern, touch keys to toggle their LED (you can’t toggle the LEDs in the bottom row, this is pre-set to the command set number).  When you are done, return to Normal operating mode by touching and swiping down on TouchPad.

Pre-set bottom row: 1,2,3,4 or 5 LEDs are lit based on the current command set.


Producing Overlays

TouchPad has been designed to offer flexibility in how it is used.  You can either draw on the included transparent overlays using a permanent marker (skip to step 3) or use the template provided to digitally produce a custom overlay design (start at step 1).

  1. Visit our Overlay Library to download the TouchPad template in a DXF or SVG format. From here, use the software of your choice (we recommend inkscape, which can be downloaded for free from www.inkscape.org) to customise the overlay. If you are using inkscape you will need to open TouchPad Template.svg.

  2. Use the Layer Visibility to select which parts should print. For example you can hide the LEDs &/or button outlines.

  3. Once you have finished designing, print the template onto transparency film, cut around the outline and use a standard hole punch to create the location holes.

  4. Attach your overlay to the TouchPad’s location posts. If you are customising a transparent overlay, you can now draw on the keys with a permanent marker.

  5. You may need to adjust the separation of the location posts to match your location holes. This can be done by loosening the rubber feet, adjusting the posts, and then re-tightening the rubber feet.

Changing overlays can trigger key presses, we advise TouchPad is unplugged for this.

Summary of files available to designers:

  • TouchPad Template.svg: Can be used with inkscape and other drawing tools to produce custom overlays (recomended method)

  • TouchPad.dxf: Alternative file format (DXF) for creating custom overlays

  • TouchPad Overlay.dxf: Blank overlay outline (DXF)


Installing Arduino

To program TouchPad using the Arduino IDE there are a number of steps you must first run through to get your computer setup correctly.

  1. Install the latest version of the Arduino Desktop IDE (there are currently issues with the Windows App so compatibility with this is not guaranteed) by clicking HERE and downloading the appropriate version (install instructions available HERE ).

  2. Open the Arduino IDE and go to File/Preferences.

  3. Add the .json web address (https://raw.githubusercontent.com/fourboards/TouchPad/master/Arduino_IDE_Boards_Manager/package_fourboards_index.json) to the field named Additional Boards Manager URLs ensuring multiple entries are comma seperated.

  4. Click OK.

  5. Go to Tools/Board/Boards Manager...

  6. Search for TouchPad and select the Four Boards Boards entry.

  7. Click install.

  8. Once the installation is finished restart the Arduino IDE and follow the instructions below for writing custom firmware.


Custom Firmware

TouchPad is controlled using an ATmega32u4 microprocessor.  This means the Arduino IDE can be used to program more complex sequences of key strokes as well as mouse movements, MIDI and Serial commands.  To use TouchPad with Arduino:

Creating your modified firmware:

  1. Follow the steps ABOVE to setup the Arduino IDE for use with TouchPad.

  2. Open the Touch_Pad sketch (available HERE ) and then edit the file as described below (Touch_Pad.ino must remain in the Touch_Pad folder with all of the corresponding files).

To assign code to a specific key, add it to the key's case statement, for example...

If you want key 1,3 (column, row) in command set 3 to type "Hello World" find the corresponding case statement below and adjust it as follow:

case 3://Use this case for row 3, column 1, commandSet 3
Keyboard.print("Hello World");
break;

If you want key 0,1 (column, row) in command set 1 to press CTRL+C find the corresponding case statement below and adjust it as follow:

case 1://Use this case for row 1, column 0, commandSet 1
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press('c');
Keyboard.releaseAll();
break;

Note that in this example a modifier key (CTRL) is being used to alter the behaviour of the 'c' key (Copy on Windows).  All of the keyboard's modifier keys have a number representing them, the CTRL key is 0x80 in hex (128 in decimal).  All of these numbers are defined in a table HERE .  Instead of using the number though, the Arduino Keyboard library is setup so you can just insert the key name (as defined in the table) into the brackets of a Keyboard.press() or Keyboard.release() function demonstrated above with KEY_LEFT_CONTROL.

If the key you are looking for is not defined in this table, then it will be defined in the ASCII table available HERE .  An example of this is the SPACE bar, to use this key you must call Keyboard.press() or Keyboard.release() with either the character itself in single quotes (' ' for space) or the decimal ASCII value (32 for space) or the hex ASCII value (0x20 for space).  Hex values must be proceeded by 0x.

There are a few keys that aren't defined in either of these places, the corresponding decimal values are: PRINT SCREEN = 206, SCROLL LOCK = 207, PAUSE = 208.

The use of some characters may require the shift key to be pressed before the key that that character is on is pressed (just like if you were using a keyboard).  In this case make sure you release both keys before continuing!  Further special characters may require key codes to be typed, mirror your keyboard movements in code for these characters.  The language your keyboard is set to in your operating system may also effect which characters can be produced.

By default the Four Boards UK Keyboard and Arduino Mouse libraries are included, reference for these can be found at:

Please note:

  • If the OTG programmer is enabled the key presses defined in firmware will only be executed if there are no key presses assigned via the 'On the go programmer', see below for disabling the OTG programmer.

  • By default a Keyboard.releaseAll() is called after every key press, see below for disabling this.

Non-UK keyboard support:

It is possible to modify the Arduino keyboard library for use with different language keyboard layouts.  To do this you need to modify the _asciimap array in Keyboard.cpp so the ASCII characters are assigned the correct key code.  Below is a list of alternate libraries which can be installed by replacing the KeyboardUK.cpp, KeyboardUK.h files with the corresponding ones:

Adding more libraries:

Serial is included and initialised by default to run at a baud rate of 9600.  If you need more libraries they can be added beneath the Keyboard and Mouse includes.  If libraries require initialisation this must be done in the setup function in TouchPad.h.

An example MIDI firmware is available in the GitHub Repo .

Modifying functionality:

For certain applications it may be desirable to disable the On The Go programmer and/or the multiple command sets.  This can be done by commenting out the relevant line in the TouchPad source code.  Inserting a '//' before the '#define statement' will disable the corresponding functionality.

//Compiler directives - effects TouchPad behaviour in described way
#define ENABLE_MULTIPLE_COMMAND_SET //Enable multiple command sets
#define ENABLE_OTG_PROGRAMMER //Enable On The Go programmer
#define ENABLE_DEFAULT_RELEASE //Enable automatic key release after each key press
//#define ENABLE_MULTIPLE_COMMAND_SET //Disable multiple command sets
//#define ENABLE_OTG_PROGRAMMER //Disable On The Go programmer
//#define ENABLE_DEFAULT_RELEASE //Disable automatic key release after each key press

To upload your modified TouchPad firmware:

  1. Plug in TouchPad via the micro USB cable.

  2. In the Arduino IDE select Tools/Board/Four Boards/TouchPad.

  3. In the Arduino IDE select Tools/Port/[The COM port TouchPad is on].

  4. Press Upload (Right hand arrow).

  5. A successful upload will be acknowledged by the 'Done Uploading' text appearing in the bottom left hand corner of the editor.

Now you’re ready to go with your custom TouchPad firmware.

Upload not working?

  • Check you have selected the correct COM port (it should say TouchPad next to it in the port selection menu).

  • Hold down the reset button on the back of TouchPad, hit upload in the Arduino IDE, when Arduino says “Uploading” in the bottom left hand corner release the reset button.

Factory Reset:

If you would like to DELETE all of the key sequences programmed via the OTG programmer in one go you will need to perform a factory reset as described below:

  1. Open a custom firmware in the Arduino IDE and navigate to the TouchPad.h file.

  2. Uncomment line 40 "#define RESET" and then upload the firmware to your TouchPad.

  3. Once it is done uploading comment out line 40 and then upload the firmware once again (this prevents a factory reset occurring on every power cycle).

  4. The main power LED will now flash indicating the TouchPad is in factory test mode.

  5. To complete the factory reset you must press one key from each row and each column.

  6. Once complete, the LEDs will perform a quick self test and then your TouchPad will return back to the normal operating mode.


Cases

Below is a case known to be TouchPad compatible (Photo and find by Rachel Gruber):


Supporting Files

For a zip file containing just the TouchPad source code and overlay templates use the direct download link below.  Alternatively you can find these files as well as Arduino hardware definitions and a MIDI example at the TouchPad GitHub repository.




Troubleshooting

  • The text and menus printed by the TouchPad in programming modes do not make sense:

    • This is likely to do with how quickly your computer can process keyboard commands. Some devices struggle to keep up with the TouchPad. To fix this you can increase the compatibility level by touching and swiping down on the TouchPad whilst in Key Programming mode. After doing this the menu should be reprinted correctly. If it still does not make sense, increase the compatibility level further by touching and swiping down on the TouchPad again whilst still in Key Program mode. Note: compatibility level can be reset using “R C” in the EXTRA menu of any key. You must exit Key Program mode for compatibility level to be reset.

  • The shortcut you’ve setup doesn’t work:

    • Use a keyboard tester website such as www.keyboardtester.com to ensure TouchPad is producing the keystrokes you require. TouchPad will exhibit different behaviours based on your operating system language settings. You will not notice this using the OTG programmer but note that the Arduino Keyboard library is based around the US keyboard layout (By default TouchPad uses a modified version for UK keyboard layout.

  • You are having trouble uploading to TouchPad from the Arduino IDE:

    • Check you have selected the correct COM port (it should say TouchPad next to it in the port selection menu).

    • Hold down the reset button on the back of TouchPad, hit upload in the Arduino IDE, when Arduino says “Uploading” in the bottom left hand corner release the reset button.

  • You are having trouble using the Arduino IDE:

    • Visit www.arduino.cc/en/Guide/Troubleshooting for general Arduino help.