# Introducing Bluefruit EZ-Key

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/011/307/medium800/adafruit_products_1535_LRG.jpg?1380306088)

Create your own wireless Bluetooth keyboard controller in an hour with the Bluefruit EZ-Key: it's the fastest, easiest and bestest Bluetooth controller. We spent years learning how to develop our own custom Bluetooth firmware, and coupled with our own BT module hardware, we've created the most Maker-friendly wireless you can get!   
  
This breakout acts just like a BT keyboard, and works great with any BT-capable device: Mac, Windows, Linux, iOS, and Android. Power the module with 3-16VDC, and pair it to the computer, tablet or phone just as you would any other BT device. Now you can connect buttons from the 12 input pins, when a button is pressed, it sends a keypress to the computer. We pre-program the module to send the 4 arrow keys, return, space, 'w', 'a', 's', 'd', '1' and '2' by default. Advanced users can reprogram the module's keys using an FTDI or other Serial console cable, for any HID key report they desire.  
  
You can pair multiple Bluefruit's to a single device, each one has a unique identifier. These modules are FCC & CE certified and are RoHS-compliant so they are easy to integrate into your project.  
  
If you want to have better control over the data sent, connect a microcontroller to the RX pin at 3-5V logic level, 9600 baud, and send ASCII data: it will be 'typed out' character by character. We also have support for various non-printable characters such as ESC, Shift, F1-F12, etc. as well as toggling the virtual keyboard on iOS.  
  
**New in v1.1** (shipping as of Oct 22 2013) - We've made Bluefruit EZ-Key even better, you can now map keys to mouse button clicks and mouse movement (up/down/left/right) as well as send mouse commands over the UART. We also now have 'over the air' remapping, no serial cable required to re-map the pins!  
  
**New in v1.2** (shipping as of Nov 7 2013) - We have added support for mapping buttons to some "Consumer Report" keys, also known as Multimedia buttons.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/308/medium800/adafruit_products_1535bottom_LRG.jpg?1380306110)

# Introducing Bluefruit EZ-Key

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/011/310/medium800/adafruit_products_1535_LRG.jpg?1380307563)

This is a tour of all the pins available on the EZ-Key module. The module consists of a CSR BlueCore with custom firmware on a breakout PCB. The PCB makes it easy to use and hard to break. Every pin and connection you want is available on the breakout board, and there's even some handy mounting holes.   
  
Let's take a tour of the pins! Starting with the top control & power pins...

# Top Row

## Grounds and Vin
To use this module, you will need to at least power it. Powering it is easy though, you can give it anywhere between 3-16VDC and the power input is reverse-polarity protected. Connect the positive wire from your battery to **Vin** and ground to the **Grounds** or **G** pin. There is an output from the onboard 3.3V voltage regulator on pin **3v** that will let you snag ~100mA of current for other sensors, microcontrollers or whatever.   
  

## Control and LEDs
To the right of the power pins, there are some control pins  

- **RS** - this is the reset pin. To reset the module, pull this pin to ground. It does not affect pairing.
- **L2 -** this is the same output that is connected to the **Pair** LED. If you want to put this in a box and have an external Pair indicator LED, wire an LED from this pin, through a 1K resistor, to ground.
- **PB** - this is the pair button pin. It is connected to the button onboard that is used to reset the pairing. If you want to make another, external pair button, connect a switch from this key to **3V** (not ground!)  
- **L1 -** this is the same output that is connected to the **Key** LED. If you want to put this in a box and have an external Key-press indicator LED, wire an LED from this pin, through a 1K resistor, to ground.
- **RX** - this is the UART input, used if you want to send UART-\>Keypress data, or re-map the buttons. It is 5V compliant, use 3V-5V TTL logic, 9600 baud.
- **TX** - this is the UART output, used for watching debug data or re-mapping the buttons. It is 3V logic level output.  

# Bottom Row
  
This row is easy, it is 12 individual pins that connect to a switch that will trigger a keypress. Each pin has a pullup resistor internally to 3V. To activate a keypress, connect the pin to ground. When it is connect to ground, a KEYDOWN is sent, when it is disconnected, a KEYUP is sent.  
  
Do not inject 5V into these pins! They connect directly to the BT module which runs at 3V.   
# Left Port (6-pins)
Despite looking _a lot_ like an FTDI connector, this is the programming/test port. We use this at the Adafruit factory to get your modules tested. It is _not_ field reprogrammable. Do not connect anything to these pins, it could damage or permanently brick the EZ-Key!  
# Introducing Bluefruit EZ-Key

## Pairing to Bluefruit

Before you can use the EZ-Key you have to **pair** it to your computer, laptop, tablet or phone. It's pretty easy to do this because EZ-Key acts just like a Bluetooth keyboard.  
  
We have detailed walkthroughs for Windows, Mac and Linux (Raspberry Pi)  
  
We have also paired it without difficulty to iOS devices such as iPhone and iPad (any version) and an Android tablet but don't have a detailed walkthrough. Check your device's documentation on how to pair a keyboard. It's usually really easy and just requires turning on BT and then scanning for the powered up module.  
  
**You only have to pair once to your device. After that, it will auto-connect.**  
  
If you ever have difficulties with auto-connecting, especially if you do a system update or upgrade, just follow the pairing procedure from the beginning. It only takes a few minutes.

The following GIF shows meaning of the red LED on board.

![](https://cdn-learn.adafruit.com/assets/assets/000/013/012/medium800thumb/adafruit_products_Blink.jpg?1448311449)

# Introducing Bluefruit EZ-Key

## Windows

This page will show you how to pair your Bluefruit EZ-Key to a Windows computer. It's tested on XP and 7 but should work similarly with Windows 8.  
  
**You only have to pair once - after the EZ-Key is paired to a computer it will auto-connect from then on**  
  
First up, you'll have to make sure you have Bluetooth v2.1 or greater on your computer. Many laptops have BT built in and unless its a really old machine (\< 2008), the built in BT should be OK. If you do not have BT built in, [you'll need a USB dongle such as this one](http://www.adafruit.com/products/1327 "Link: http://www.adafruit.com/products/1327")

![](https://cdn-learn.adafruit.com/assets/assets/000/011/269/medium800/adafruit_products_1327_LRG.jpg?1380297490)

Info: 

# Step 0. Install USB adapter
99% of the time, you can just plug it in and Windows will automatically install the drivers, as there are only two main chipsets (CSR & Broadcom) and they have built in support.  
  

# Step 1. Power the Bluefruit EZ-Key and Press the Pair Button
The title of this step is pretty much what you have to do. Remember that you have solder the 0.1" headers to the module or at least solder wires to the **Vin** and **Ground** connections. Connect Vin to 3 to 16VDC (5V is ideal) and ground to the ground power wire.   
![](https://cdn-learn.adafruit.com/assets/assets/000/011/270/medium800/adafruit_products_power.png?1380297967)

You should see the red LED blink. Now **press the mini button on the EZ Key**  **for 5 seconds** and release, this will erase any old pairing information and let you re-pair to your computer.  
  
The red LED will now blink at a steady once-a-second.

# Step 2 Pair using Windows Bluetooth services
In the Control Panel, find the **Add Bluetooth Device** entry  
![](https://cdn-learn.adafruit.com/assets/assets/000/011/271/medium800/adafruit_products_addbtdev.png?1380298186)

Wait a minute until you see the Adafruit Keyboard device show up with the full ID name, it will look like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/011/272/medium800/adafruit_products_selectdev.png?1380298395)

Select the Adafruit EZ-Key and press **Next**

![](https://cdn-learn.adafruit.com/assets/assets/000/011/274/medium800/adafruit_products_adding.png?1380298476)

It may take up to 3 minutes to get the driver and install it, this is normal. If Windows complains about a timeout, just start the process over (it's rare for that to happen)  
  
If it asks you for a passcode, the pairing code is **1234**

![](https://cdn-learn.adafruit.com/assets/assets/000/011/275/medium800/adafruit_products_success.png?1380298509)

![](https://cdn-learn.adafruit.com/assets/assets/000/011/273/medium800/adafruit_products_bthiddev.png?1380298467)

That's it! You will now see the red LED blinking much slower, to indicate it is paired succesfully

# Introducing Bluefruit EZ-Key

## Mac

This page will show you how to pair your Bluefruit EZ-Key to a Mac OS X computer. Connecting to iOS is nearly identical.  
  
**You only have to pair once - after the EZ-Key is paired to a computer it will auto-connect from then on**  
  
We have never found a Mac without BT built in so lucky for you, no extra module is required!

# Step 1. Power the Bluefruit EZ-Key and Press the Pair Button
The title of this step is pretty much what you have to do. Remember that you have solder the 0.1" headers to the module or at least solder wires to the **Vin** and **Ground** connections. Connect Vin to 3 to 16VDC (5V is ideal) and ground to the ground power wire. ![](https://cdn-learn.adafruit.com/assets/assets/000/011/294/medium800/adafruit_products_power.png?1380302587)

You should see the red LED blink. Now **press the mini button on the EZ Key**  **for 5 seconds** and release, this will erase any old pairing information and let you re-pair to your computer.  
  
The red LED will now blink at a steady once-a-second.

# Step 2. Pair Using MacOS Bluetooth Service
  
In the System Preferences, find the Bluetooth icon  
![](https://cdn-learn.adafruit.com/assets/assets/000/011/295/medium800/adafruit_products_adafruit_2111.jpg?1380302663)

Double-click to open, make sure Bluetooth is **ON** (some computers have it off, you must have BT on!) and click **Set Up New Device**

![](https://cdn-learn.adafruit.com/assets/assets/000/011/296/medium800/adafruit_products_adafruit_2113.jpg?1380302732)

Let the assistant run for a minute until it locates and displays the EZ-Key module  
Select it and click Continue

![](https://cdn-learn.adafruit.com/assets/assets/000/011/297/medium800/adafruit_products_adafruit_2114.jpg?1380302758)

It'll take a minute for it to pair

![](https://cdn-learn.adafruit.com/assets/assets/000/011/298/medium800/adafruit_products_adafruit_2115.jpg?1380302776)

That's it! If you get a pop-up asking you to configure the keyboard layout, just close or quit that window.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/299/medium800/adafruit_products_adafruit_2116.jpg?1380302864)

You can now see that the EZ-Key is paired and connected.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/300/medium800/adafruit_products_adafruit_2117.jpg?1380302916)

# Introducing Bluefruit EZ-Key

## Linux (e.g. Raspberry Pi)

This page will show you how to pair your Bluefruit EZ-Key to a Linux computer. It's tested on Raspberry Pi & Raspbian but the instructions will be similar for other machines and distros (we hope!) Check your distro documentation if this doesn't work.  
  
_Thanks to_ [_http://www.correlatedcontent.com/blog/bluetooth-keyboard-on-the-raspberry-pi/_](http://www.correlatedcontent.com/blog/bluetooth-keyboard-on-the-raspberry-pi/ "Link: http://www.correlatedcontent.com/blog/bluetooth-keyboard-on-the-raspberry-pi/") _for the details!_  
  
**You only have to pair once - after the EZ-Key is paired to a computer it will auto-connect from then on**  
  
First up, you'll have to make sure you have Bluetooth v2.1 or greater on your computer. Many laptops have BT built in and unless its a really old machine (\< 2008), the built in BT should be OK. If you do not have BT built in, [you'll need a USB dongle such as this one](http://www.adafruit.com/products/1327)

![](https://cdn-learn.adafruit.com/assets/assets/000/011/276/medium800/adafruit_products_1327_LRG.jpg?1380298836)

Info: 

# Step 0 Plug in BT Adapter
  
With the Raspberry Pi off, plug in the BT module and reboot.   
  

# Step 1 Update & Install Bluez
Make sure you have Internet connectivity on your Pi so you can install the following updates & software for Bluetooth control.  
  
All of the following must be typed into a Terminal window or Console or Command line.  
```auto
sudo apt-get update
sudo update-rc.d -f dbus defaults
sudo apt-get install bluez python-gobject
```

![](https://cdn-learn.adafruit.com/assets/assets/000/011/281/medium800/adafruit_products_sudoaptget.png?1380300899)

![](https://cdn-learn.adafruit.com/assets/assets/000/011/282/medium800/adafruit_products_sudoaptget.png?1380300962)

Now run

> **hcitool dev**

to see the bluetooth USB module ![](https://cdn-learn.adafruit.com/assets/assets/000/011/283/medium800/adafruit_products_hcitool.png?1380300990)

Lastly, we'll make a minor edit to allow passkey-less pairing. Run

> **sudo nano /usr/bin/bluez-simple-agent**

To edit the agent that manages BT pairing. Type **Control-W** to search for **KeyboardDisplay**  
![](https://cdn-learn.adafruit.com/assets/assets/000/011/284/medium800/adafruit_products_search.png?1380301093)

Then edit that line and change **KeyoardDisplay** to **DisplayYesNo**

![](https://cdn-learn.adafruit.com/assets/assets/000/011/285/medium800/adafruit_products_displayyesno.png?1380301160)

# Step 2. Power the Bluefruit EZ-Key and Press the Pair Button
The title of this step is pretty much what you have to do. Remember that you have solder the 0.1" headers to the module or at least solder wires to the **Vin** and **Ground** connections. Connect Vin to 3 to 16VDC (5V is ideal) and ground to the ground power wire. ![](https://cdn-learn.adafruit.com/assets/assets/000/011/280/medium800/adafruit_products_power.png?1380299467)

You should see the red LED blink. Now **press the mini button on the EZ Key**  **for 5 seconds** and release, this will erase any old pairing information and let you re-pair to your computer.  
  
The red LED will now blink at a steady once-a-second.

# Step 3. Scan & Connect to Bluefruit Module
  
Now it's time to find the Bluefruit device. Run   

> hcitool scan

to scan for devices. You may have to run it once or twice to see the Adafruit device pop up  
![](https://cdn-learn.adafruit.com/assets/assets/000/011/288/medium800/adafruit_products_scan.png?1380301326)

See that long number before the name? Starts with 00:18:... ? Each module has a **unique** identifier number. Your setup will have a different ID so be sure to type out the exact same ID you have. We will proceed as if you were pairing to the module on my desk :)  
  
We will now create a device for the keyboard. Type in

> **sudo bluez-simple-agent hci0 00:18:96:B0:04:82**

But changing it to the ID number you have  
![](https://cdn-learn.adafruit.com/assets/assets/000/011/290/medium800/adafruit_products_agent.png?1380301474)

Next, we will _trust_ this keyboard. Type in

> **sudo bluez-test-device trusted 00:18:96:B0:04:82 yes**

(don't forget that yes at the end)  
followed by   

> **sudo bluez-test-device trusted 00:18:96:B0:04:82**

(no yes at the end)  
You should see a **1** after the last command. If you get a **0** try again, check that you typed the #'s right.  
![](https://cdn-learn.adafruit.com/assets/assets/000/011/291/medium800/adafruit_products_trust.png?1380301610)

Finally, we can connect! The last command to run is:

> **sudo bluez-test-input connect 00:18:96:B0:04:82**

If you want to ever remove the pairing, type in  

> **sudo bluez-test-device remove 00:18:96:B0:04:82**

Now you will notice the red LED on the module blink slower. ![](https://cdn-learn.adafruit.com/assets/assets/000/011/292/medium800/adafruit_products_connect.png?1380301745)

Info: 

# Introducing Bluefruit EZ-Key

## User Manual

![](https://cdn-learn.adafruit.com/assets/assets/000/011/309/medium800/adafruit_products_ez-key_buttons.png?1380306986)

The user manual is the shortest page of this guide, because its _really really easy_ to get going.

1. Power the EZ-Key with 3-16VDC power. Batteries work great: 3 or 4 alkaline or rechargeable 1.5V, a 9V, Lithium Ion/Polymer, Lead acid... Whatever you have!
2. Pair the EZ-Key to your computer, laptop, tablet or phone
3. Connect one side of a switch to GPIO #0 through #11. Connect the other side to Ground.
4. Open up a notepad or text editor on the paired computer  
5. Press the switch to send a key code
6. Profit?

You will be able to see the green LED blink every time it detects a switch and sends the keycode.  
  
Since GPIO #0 through #3 are arrow keys, they might be more difficult to detect if the notepad software is empty. Try GPIO #4 through #11 which send printable characters  
  
When a switch is pressed, a KEYDOWN command is sent, when it is release, a matching KEYUP goes out. You can have up to 6 switches pressed at once and it will be like they were pressed all at the same time. 6 is a strict limit of Bluetooth.  
  
**Don't forget: You don't have to use a plain clicky switch! Try tilt sensors, reed switches, conductive velcro, big stompy buttons, arcade joysticks, ANYTHING that makes/breaks two contacts**  
  
Here is the default switch-to-key mapping:  

- #0 - Up Arrow
- #1 - Down Arrow
- #2 - Left Arrow
- #3 - Right Arrow
- #4 - Return
- #5 - Space
- #6 - the number '1'
- #7 - the number '2'
- #8 - lowercase 'w'
- #9 - lowercase 'a'
- #10 - lowercase 's'
- #11 - lowercase 'd'

You can customize these with a little bit of effort, see the Remapping Buttons page.  
# Dimensions in Inches & mm
![](https://cdn-learn.adafruit.com/assets/assets/000/011/312/medium800/adafruit_products_dimsin.png?1380308540)

![](https://cdn-learn.adafruit.com/assets/assets/000/011/313/medium800/adafruit_products_dims.png?1380308552)

# Introducing Bluefruit EZ-Key

## Sending Keys/Mouse Via Serial

For advanced users, you may want to hook up your Bluefruit to a microcontroller and send characters or strings via Bluetooth.   
  
You can do this with the UART port on the EZ-Key. The UART pins are labeled RX (data going _into_ the module) and TX (debug data coming _out_ of the module). You can get away with just connecting to RX. The RX pin is 5V compliant, you can send it 3V or 5V TTL logic levels. Use 9600 baud serial, all microcontrollers will support this.  
  
You can also send raw HID Keyboard reports for complex key-stroke combinations and controls.   
  
**In version v1.1 (Oct 22, 2013 or later)** HID Mouse reports are also supported, you can send mouse movement and clicks via the UART and microcontroller  
**In version v1.2 (Nov 2013 or later)** HID consumer report keys are supported, there are a few supported 'multimedia keys' - see below for a list and how to send via the UART  
  
Don't forget to also tie a ground pin from your microcontroller to the EZ-Key for the logic ground reference!

# Printable character keymap
  
For printing ASCII characters, you can simply send those to the UART and they will be 'typed out'. See below for the list of printable ASCII characters, starting with 0x20 and ending with 0x7E  
  
[Thanks to Wikipedia for this nice chart!](http://en.wikipedia.org/wiki/ASCII_chart)  
| Binary | Oct | Dec | Hex | Glyph |
| --- | --- | --- | --- | --- |
| 010 0000 | 040 | 32 | 20 | |
| 010 0001 | 041 | 33 | 21 | ! |
| 010 0010 | 042 | 34 | 22 | " |
| 010 0011 | 043 | 35 | 23 | # |
| 010 0100 | 044 | 36 | 24 | $ |
| 010 0101 | 045 | 37 | 25 | % |
| 010 0110 | 046 | 38 | 26 | & |
| 010 0111 | 047 | 39 | 27 | ' |
| 010 1000 | 050 | 40 | 28 | ( |
| 010 1001 | 051 | 41 | 29 | ) |
| 010 1010 | 052 | 42 | 2A | \* |
| 010 1011 | 053 | 43 | 2B | + |
| 010 1100 | 054 | 44 | 2C | , |
| 010 1101 | 055 | 45 | 2D | - |
| 010 1110 | 056 | 46 | 2E | . |
| 010 1111 | 057 | 47 | 2F | / |
| 011 0000 | 060 | 48 | 30 | 0 |
| 011 0001 | 061 | 49 | 31 | 1 |
| 011 0010 | 062 | 50 | 32 | 2 |
| 011 0011 | 063 | 51 | 33 | 3 |
| 011 0100 | 064 | 52 | 34 | 4 |
| 011 0101 | 065 | 53 | 35 | 5 |
| 011 0110 | 066 | 54 | 36 | 6 |
| 011 0111 | 067 | 55 | 37 | 7 |
| 011 1000 | 070 | 56 | 38 | 8 |
| 011 1001 | 071 | 57 | 39 | 9 |
| 011 1010 | 072 | 58 | 3A | : |
| 011 1011 | 073 | 59 | 3B | ; |
| 011 1100 | 074 | 60 | 3C | \< |
| 011 1101 | 075 | 61 | 3D | = |
| 011 1110 | 076 | 62 | 3E | \> |
| 011 1111 | 077 | 63 | 3F | ? |

| Binary | Oct | Dec | Hex | Glyph |
| --- | --- | --- | --- | --- |
| 100 0000 | 100 | 64 | 40 | @ |
| 100 0001 | 101 | 65 | 41 | A |
| 100 0010 | 102 | 66 | 42 | B |
| 100 0011 | 103 | 67 | 43 | C |
| 100 0100 | 104 | 68 | 44 | D |
| 100 0101 | 105 | 69 | 45 | E |
| 100 0110 | 106 | 70 | 46 | F |
| 100 0111 | 107 | 71 | 47 | G |
| 100 1000 | 110 | 72 | 48 | H |
| 100 1001 | 111 | 73 | 49 | I |
| 100 1010 | 112 | 74 | 4A | J |
| 100 1011 | 113 | 75 | 4B | K |
| 100 1100 | 114 | 76 | 4C | L |
| 100 1101 | 115 | 77 | 4D | M |
| 100 1110 | 116 | 78 | 4E | N |
| 100 1111 | 117 | 79 | 4F | O |
| 101 0000 | 120 | 80 | 50 | P |
| 101 0001 | 121 | 81 | 51 | Q |
| 101 0010 | 122 | 82 | 52 | R |
| 101 0011 | 123 | 83 | 53 | S |
| 101 0100 | 124 | 84 | 54 | T |
| 101 0101 | 125 | 85 | 55 | U |
| 101 0110 | 126 | 86 | 56 | V |
| 101 0111 | 127 | 87 | 57 | W |
| 101 1000 | 130 | 88 | 58 | X |
| 101 1001 | 131 | 89 | 59 | Y |
| 101 1010 | 132 | 90 | 5A | Z |
| 101 1011 | 133 | 91 | 5B | [ |
| 101 1100 | 134 | 92 | 5C | \ |
| 101 1101 | 135 | 93 | 5D | ] |
| 101 1110 | 136 | 94 | 5E | ^ |
| 101 1111 | 137 | 95 | 5F | \_ |

| Binary | Oct | Dec | Hex | Glyph |
| --- | --- | --- | --- | --- |
| 110 0000 | 140 | 96 | 60 | ` |
| 110 0001 | 141 | 97 | 61 | a |
| 110 0010 | 142 | 98 | 62 | b |
| 110 0011 | 143 | 99 | 63 | c |
| 110 0100 | 144 | 100 | 64 | d |
| 110 0101 | 145 | 101 | 65 | e |
| 110 0110 | 146 | 102 | 66 | f |
| 110 0111 | 147 | 103 | 67 | g |
| 110 1000 | 150 | 104 | 68 | h |
| 110 1001 | 151 | 105 | 69 | i |
| 110 1010 | 152 | 106 | 6A | j |
| 110 1011 | 153 | 107 | 6B | k |
| 110 1100 | 154 | 108 | 6C | l |
| 110 1101 | 155 | 109 | 6D | m |
| 110 1110 | 156 | 110 | 6E | n |
| 110 1111 | 157 | 111 | 6F | o |
| 111 0000 | 160 | 112 | 70 | p |
| 111 0001 | 161 | 113 | 71 | q |
| 111 0010 | 162 | 114 | 72 | r |
| 111 0011 | 163 | 115 | 73 | s |
| 111 0100 | 164 | 116 | 74 | t |
| 111 0101 | 165 | 117 | 75 | u |
| 111 0110 | 166 | 118 | 76 | v |
| 111 0111 | 167 | 119 | 77 | w |
| 111 1000 | 170 | 120 | 78 | x |
| 111 1001 | 171 | 121 | 79 | y |
| 111 1010 | 172 | 122 | 7A | z |
| 111 1011 | 173 | 123 | 7B | { |
| 111 1100 | 174 | 124 | 7C | | |
| 111 1101 | 175 | 125 | 7D | } |
| 111 1110 | 176 | 126 | 7E | ~ |

# Non-printable Characters
  
There's a lot of other keycodes you may want to send, here is the mapping from the 8-bit byte to the keycode sent.  
  
  

| HEX | Keyname |
| 0x01 | Insert |
| 0x02 | Home |
| 0x03 | Page Up |
| 0x04 | Delete |
| 0x05 | End |
| 0x06 | Page Down |
| 0x07 | Right Arrow |
| 0x08 | Backspace |
| 0x09 | Tab |
| 0x0A | Enter |
| 0x0B | Left Arrow |
| 0x0C | Down Arrow |
| 0x0D | Enter |
| 0x0E | Up Arrow |
| 0x0F - 0x1A | F1 - F12 |
| 0x1B | Esc |
| 0x1C | Caps Lock |
| 0x1D | Scroll Lock |
| 0x1E | Break |
| 0x1F | Num Lock |
| 0x20-0x7E | Printable Ascii |
| 0x7F | Toggle iOS Keyboard |
| 0xE0 | Left Control |
| 0xE1 | Left Shift |
| 0xE2 | Left Alt |
| 0xE3 | Left GUI |
| 0xE4 | Right Control |
| 0xE5 | Right Shift |
| 0xE6 | Right Alt |
| 0xE7 | Right GUI |

# Raw HID Keyboard Reports
  
Bluefruit can send raw HID Keyboard reports. This allows sending any modifier keys + up to 6 keycodes at once. Its advanced but super useful for when you want to have fine-control of keypresses!   
  
Raw HID reports start with **0xFD** and have 8 bytes following. For keyboard, its  
**0xFD** **[modifiers] 0x00** **[keycode1]** **[keycode2]** **[keycode3]** **[keycode4]** **[keycode5]** **[keycode6]**Info: 

Here's a list of USB HID keycodes (its in java format but you get the idea), you can also get another list here [http://www.freebsddiary.org/APC/usb\_hid\_usages.php](http://www.freebsddiary.org/APC/usb_hid_usages.php) under "7 Keyboard"

```auto
// Bits in usbHidKeyboardInput.modifiers
final byte MODIFIER_NONE          =byte((0));
final byte MODIFIER_CONTROL_LEFT  =byte((1<<0));
final byte MODIFIER_SHIFT_LEFT    =byte((1<<1));
final byte MODIFIER_ALT_LEFT      =byte((1<<2));
final byte MODIFIER_GUI_LEFT      =byte((1<<3));
final byte MODIFIER_CONTROL_RIGHT =byte((1<<4));
final byte MODIFIER_SHIFT_RIGHT   =byte((1<<5));
final byte MODIFIER_ALT_RIGHT     =byte((1<<6));
final byte MODIFIER_GUI_RIGHT     =byte((1<<7));

// Values for usbHidKeyboardInput.keyCodes
// Only the key codes for common keys are defined here. See Hut1_12.pdf for a full list.
final byte KEY_NONE               =byte(0x00);
final byte KEY_A                  =byte(0x04);
final byte KEY_B                  =byte(0x05);
final byte KEY_C                  =byte(0x06);
final byte KEY_D                  =byte(0x07);
final byte KEY_E                  =byte(0x08);
final byte KEY_F                  =byte(0x09);
final byte KEY_G                  =byte(0x0A);
final byte KEY_H                  =byte(0x0B);
final byte KEY_I                  =byte(0x0C);
final byte KEY_J                  =byte(0x0D);
final byte KEY_K                  =byte(0x0E);
final byte KEY_L                  =byte(0x0F);
final byte KEY_M                  =byte(0x10);
final byte KEY_N                  =byte(0x11);
final byte KEY_O                  =byte(0x12);
final byte KEY_P                  =byte(0x13);
final byte KEY_Q                  =byte(0x14);
final byte KEY_R                  =byte(0x15);
final byte KEY_S                  =byte(0x16);
final byte KEY_T                  =byte(0x17);
final byte KEY_U                  =byte(0x18);
final byte KEY_V                  =byte(0x19);
final byte KEY_W                  =byte(0x1A);
final byte KEY_X                  =byte(0x1B);
final byte KEY_Y                  =byte(0x1C);
final byte KEY_Z                  =byte(0x1D);
final byte KEY_1                  =byte(0x1E);
final byte KEY_2                  =byte(0x1F);
final byte KEY_3                  =byte(0x20);
final byte KEY_4                  =byte(0x21);
final byte KEY_5                  =byte(0x22);
final byte KEY_6                  =byte(0x23);
final byte KEY_7                  =byte(0x24);
final byte KEY_8                  =byte(0x25);
final byte KEY_9                  =byte(0x26);
final byte KEY_0                  =byte(0x27);
final byte KEY_RETURN             =byte(0x28);
final byte KEY_ESCAPE             =byte(0x29);
final byte KEY_BACKSPACE          =byte(0x2A);
final byte KEY_TAB                =byte(0x2B);
final byte KEY_SPACE              =byte(0x2C);
final byte KEY_MINUS              =byte(0x2D);
final byte KEY_EQUAL              =byte(0x2E);
final byte KEY_BRACKET_LEFT       =byte(0x2F);
final byte KEY_BRACKET_RIGHT      =byte(0x30);
final byte KEY_BACKSLASH          =byte(0x31);
final byte KEY_EUROPE_1           =byte(0x32);
final byte KEY_SEMICOLON          =byte(0x33);
final byte KEY_APOSTROPHE         =byte(0x34);
final byte KEY_GRAVE              =byte(0x35);
final byte KEY_COMMA              =byte(0x36);
final byte KEY_PERIOD             =byte(0x37);
final byte KEY_SLASH              =byte(0x38);
final byte KEY_CAPS_LOCK          =byte(0x39);
final byte KEY_F1                 =byte(0x3A);
final byte KEY_F2                 =byte(0x3B);
final byte KEY_F3                 =byte(0x3C);
final byte KEY_F4                 =byte(0x3D);
final byte KEY_F5                 =byte(0x3E);
final byte KEY_F6                 =byte(0x3F);
final byte KEY_F7                 =byte(0x40);
final byte KEY_F8                 =byte(0x41);
final byte KEY_F9                 =byte(0x42);
final byte KEY_F10                =byte(0x43);
final byte KEY_F11                =byte(0x44);
final byte KEY_F12                =byte(0x45);
final byte KEY_PRINT_SCREEN       =byte(0x46);
final byte KEY_SCROLL_LOCK        =byte(0x47);
final byte KEY_PAUSE              =byte(0x48);
final byte KEY_INSERT             =byte(0x49);
final byte KEY_HOME               =byte(0x4A);
final byte KEY_PAGE_UP            =byte(0x4B);
final byte KEY_DELETE             =byte(0x4C);
final byte KEY_END                =byte(0x4D);
final byte KEY_PAGE_DOWN          =byte(0x4E);
final byte KEY_ARROW_RIGHT        =byte(0x4F);
final byte KEY_ARROW_LEFT         =byte(0x50);
final byte KEY_ARROW_DOWN         =byte(0x51);
final byte KEY_ARROW_UP           =byte(0x52);
final byte KEY_NUM_LOCK           =byte(0x53);
final byte KEY_KEYPAD_DIVIDE      =byte(0x54);
final byte KEY_KEYPAD_MULTIPLY    =byte(0x55);
final byte KEY_KEYPAD_SUBTRACT    =byte(0x56);
final byte KEY_KEYPAD_ADD         =byte(0x57);
final byte KEY_KEYPAD_ENTER       =byte(0x58);
final byte KEY_KEYPAD_1           =byte(0x59);
final byte KEY_KEYPAD_2           =byte(0x5A);
final byte KEY_KEYPAD_3           =byte(0x5B);
final byte KEY_KEYPAD_4           =byte(0x5C);
final byte KEY_KEYPAD_5           =byte(0x5D);
final byte KEY_KEYPAD_6           =byte(0x5E);
final byte KEY_KEYPAD_7           =byte(0x5F);
final byte KEY_KEYPAD_8           =byte(0x60);
final byte KEY_KEYPAD_9           =byte(0x61);
final byte KEY_KEYPAD_0           =byte(0x62);
final byte KEY_KEYPAD_DECIMAL     =byte(0x63);
final byte KEY_EUROPE_2           =byte(0x64);
final byte KEY_APPLICATION        =byte(0x65);
final byte KEY_POWER              =byte(0x66);
final byte KEY_KEYPAD_EQUAL       =byte(0x67);
final byte KEY_F13                =byte(0x68);
final byte KEY_F14                =byte(0x69);
final byte KEY_F15                =byte(0x6A);
final byte KEY_CONTROL_LEFT       =byte(0xE0);
final byte KEY_SHIFT_LEFT         =byte(0xE1);
final byte KEY_ALT_LEFT           =byte(0xE2);
final byte KEY_GUI_LEFT           =byte(0xE3);
final byte KEY_CONTROL_RIGHT      =byte(0xE4);
final byte KEY_SHIFT_RIGHT        =byte(0xE5);
final byte KEY_ALT_RIGHT          =byte(0xE6);
final byte KEY_GUI_RIGHT          =byte(0xE7);
```

Here is the Arduino function we use to send a raw **keyCommand**. For example, if you want to send the keystroke for the letter 'a' (no shift) you'll want to call

> keyCommand(0, 4);

to press the keycode 4 ('a') followed by a release  

> keyCommand(0, 0);

if you want to send the keystroke for SHIFT 'a' you'll want to call  

> keyCommand(MODIFIER\_SHIFT\_LEFT, 4);

if you want to send the keystroke for CTRL-SHIFT 'a' you'll want to call  

> keyCommand(MODIFIER\_SHIFT\_LEFT | MODIFIER\_CONTROL\_LEFT, 4);

You can also send multiple keystrokes ('chords'). If you want to press 'a' and 'b' at the same time, send   

> keyCommand(0, 4, 5);

for keycodes 4 and 5 at the same time. You can send up to 6 consecutive keys at once, don't forget to send the release 'key up' command or the key will be 'stuck'!  
```auto
void keyCommand(uint8_t modifiers, uint8_t keycode1, uint8_t keycode2 = 0, uint8_t keycode3 = 0, 
                uint8_t keycode4 = 0, uint8_t keycode5 = 0, uint8_t keycode6 = 0) {
  BT.write(0xFD);       // our command
  BT.write(modifiers);  // modifier!
  BT.write((byte)0x00); // 0x00  
  BT.write(keycode1);   // key code #1
  BT.write(keycode2); // key code #2
  BT.write(keycode3); // key code #3
  BT.write(keycode4); // key code #4
  BT.write(keycode5); // key code #5
  BT.write(keycode6); // key code #6
}
```

# Raw HID Mouse Reports
  
As of v1.1 (shipping Oct 22, 2013) Bluefruit can also send raw HID Mouse reports. This allows moving and clicking a virtual mouse! Mouse reports are _relative_ movement. So you can send 'go left 4 units' but you cant send 'go to absolute location x, y'  
  
Raw HID reports start with **0xFD** and have 8 bytes following. For mouse, its  
**0xFD 0x00**  **0x03** **[buttons]** **[left/right]** **[up/down****] **** 0x0 0x0 0x0**  
  
For buttons, its a bitmask, left button (button 0) is **0x01** right button (button 1) is **0x02** , etc so that **button n** is **(1 \<\< n)** you can | these together  
  
up/down/left/right are again, relative movements. You can move up to +127 up/left to -127 down/right units at a time.  
```auto
void mouseCommand(uint8_t buttons, uint8_t x, uint8_t y) {
  BT.write(0xFD);
  BT.write((byte)0x00);
  BT.write((byte)0x03);
  BT.write(buttons);
  BT.write(x);
  BT.write(y);
  BT.write((byte)0x00);
  BT.write((byte)0x00);
  BT.write((byte)0x00);
}
```

For example if we wanted to click the left button and drag the mouse down 50 units send

> **mouseCommand(0x1, 0, -50);**

# Raw HID Consumer Reports
  
As of v1.2, Bluefruit can send raw HID consumer reports. There are "Home", "KeyboardLayout", "Search", "Snapshot", "VolumeUp", "VolumeDown", "Play/Pause", "Fast Forward", "Rewind","Scan Next Track", "Scan Previous Track", "Random Play","Stop" keys you can use with a 2 bytes bitmask.  
  
Raw HID consumer report start with **0xFD** and have 8 bytes following. For consumer keys, its  
**0xFD 0x00**  **0x02** **[bitmask]** **[bitmask]**  **0x0**  **0x0 0x0 0x0**  
  
"Home" is bit 0, the bitmask is 0x01 0x00  
"Stop" is bit 12, the bitmask is 0x00 0x10  
  
You can | these together like mouse report  
```auto
void consumerCommand(uint8_t mask0,uint8_t mask1) {
  BT.write(0xFD);
  BT.write((byte)0x00);
  BT.write((byte)0x02);
  BT.write(mask0);
  BT.write(mask1);
  BT.write((byte)0x00);
  BT.write((byte)0x00);
  BT.write((byte)0x00);
  BT.write((byte)0x00);
}
```

For example if we wanted to click the Play/Pause

> consumerCommand**(0x40,0x00);**

Then release it  

> consumerCommand**(0x00,0x00);**

# Testing Sketch (Arduino)
We use this code to generate/test the various UART-sendable characters, you can use it for reference to control via an Arduino or other microcontroller. Remember that some of these non-printing characters can really confuse your computer so use with care!  
```auto
// Adafruit test code for Bluefruit EZ-Key serial reports
// Uncomment tests as you wish, remember that this will
// send various keypresses to your computer which may really
// annoy it! We used
// http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
// to test the non-printing characters!
// Connect the RX pin on the EZ-Key to digital #2 on the UNO

#include <SoftwareSerial.h>

SoftwareSerial BT = SoftwareSerial(3, 2);

void printabletest() {
  Serial.println("Testing printable 0x20-0x7E...");
  for (char c = 0x20; c <= 0x7E; c++) {
    Serial.write(c);
    BT.write(c);
    delay(10);
  }
  
  BT.write('\n');
  delay(3000);
  Serial.read(); // eat one char
  Serial.println();
  
  for (uint16_t i=0; i<200; i++) {
    while (Serial.available()) 
      Serial.write(Serial.read());
    delay(10);
  }
}

void nonprinting() { 
  Serial.println("Insert");
  BT.write(1); delay(1000);
  Serial.println("Home");
  BT.write(2); delay(1000);
  Serial.println("Page Up");
  BT.write(3); delay(1000);
  Serial.println("Delete");
  BT.write(4); delay(1000);
  Serial.println("End");
  BT.write(5); delay(1000);
  Serial.println("Page Down");
  BT.write(6); delay(1000);
  Serial.println("Right Arrow");
  BT.write(7); delay(1000);
  Serial.println("Backspace");
  BT.write(8); delay(1000);
  Serial.println("Tab");
  BT.write(9); delay(1000);
  Serial.println("Enter");
  BT.write(10); delay(1000);
  Serial.println("Left Arrow");
  BT.write(11); delay(1000);
  Serial.println("Down Arrow");
  BT.write(12); delay(1000);
  Serial.println("Enter");
  BT.write(13); delay(1000);
  Serial.println("Up Arrow");
  BT.write(14); delay(1000);

  for (uint8_t i=15; i<27; i++) {
    Serial.print("F"); Serial.println(i-14, DEC);
     BT.write(i); delay(500);
  }
  Serial.println("ESC");
  BT.write(27); delay(1000);
  Serial.println("Capslock");
  BT.write(28); delay(1000);
  Serial.println("Scroll lock");
  BT.write(29); delay(1000);
  Serial.println("Break");
  BT.write(30); delay(1000);
  Serial.println("Numlock");
  BT.write(31); delay(500);
 
}
void altkeystest() {
  Serial.println("Left Control\n");
  BT.write(0xE0);
  delay(500);
  Serial.println("Left Shift\n");
  BT.write(0xE1);
  delay(500);
  Serial.println("Left Alt\n");
  BT.write(0xE2);
  delay(500);
  Serial.println("Left GUI\n");
  BT.write(0xE3);
  delay(500);
  Serial.println("Right Control\n");
  BT.write(0xE4);
  delay(500);
  Serial.println("Right Shift\n");
  BT.write(0xE5);
  delay(500);
  Serial.println("Right Alt\n");
  BT.write(0xE6);
  delay(500);
  Serial.println("Right GUI\n");
  BT.write(0xE7);
  delay(500); 
}

void iphonekeyboard() {
  while (1) {
    Serial.println("toggle keyboard");
    BT.write(0x7F);
    delay(1000);
  }
}

void keyCommand(uint8_t modifiers, uint8_t keycode1, uint8_t keycode2 = 0, uint8_t keycode3 = 0, 
                uint8_t keycode4 = 0, uint8_t keycode5 = 0, uint8_t keycode6 = 0) {
  BT.write(0xFD);       // our command
  BT.write(modifiers);  // modifier!
  BT.write((byte)0x00); // 0x00  
  BT.write(keycode1);   // key code #1
  BT.write(keycode2); // key code #2
  BT.write(keycode3); // key code #3
  BT.write(keycode4); // key code #4
  BT.write(keycode5); // key code #5
  BT.write(keycode6); // key code #6
}

void rawkeytest() {
  // test sending a single 'a' (keycode 4)
  keyCommand(0, 4);
  delay(100);
  keyCommand(0, 0);
} 

/************** Support added in v1.1 */

void rawmousetest() {
  Serial.println("Move mouse!");
  Serial.println("Right");
  mouseCommand(0, -100, 0);
  delay(200); 
  Serial.println("Down");
  mouseCommand(0, 0, -100);  
  delay(200); 
  Serial.println("Left");
  mouseCommand(0, 100, 0);  
  delay(200); 
  Serial.println("Up");
  mouseCommand(0, 0, 100);  
  delay(200); 
}

void mouseCommand(uint8_t buttons, uint8_t x, uint8_t y) {
  BT.write(0xFD);
  BT.write((byte)0x00);
  BT.write((byte)0x03);
  BT.write(buttons);
  BT.write(x);
  BT.write(y);
  BT.write((byte)0x00);
  BT.write((byte)0x00);
  BT.write((byte)0x00);
}

/************** Support added in v1.1 */

void setup() {
  Serial.begin(9600);
  BT.begin(9600);

  Serial.println("Softserial/BT test!\n\rPress any key+return to start");
  while (! Serial.available());

  printabletest(); delay(200);
  //altkeystest();
  //nonprinting();
  //iphonekeyboard();
  //rawkeytest();

  //Supported in v1.1
  //rawmousetest();
}

void loop() {
  
}
```

# Introducing Bluefruit EZ-Key

## Remapping the Buttons (Serial)

Danger: 

The default buttons-\>keypresses will be satisfactory for most projects. However, you may want to customize those keys so when a GPIO pin is pulled to ground, a different keystroke is sent. It isn't that difficult to do! However, you will need an [FTDI Friend](http://www.adafruit.com/products/284) or [USB console cable](http://www.adafruit.com/products/954) to connect the EZ-Key to your computer.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/301/medium800/adafruit_products_consolecable.png?1380304479)

If using an FTDI friend, connect the TX pin of the EZ-Key to the RX pin on your FTDI friend and the RX pin to the TX pin (receiver goes to transmit). Also be sure to power the EZ-Key. You do not have to pair it for this remapping  
  
You will have to put the EZ-Key into re-mapping mode. To do this, the pair-button must be pressed while the module is powered up. The easiest way to do this is to disconnect the red Vin wire from the console cable, press down on the button, then plug in the red wire, that's it!

Danger: 

# Load Processing Sketch

We wrote the re-mapping software in Processing. [Processing is cross-platform and easy to install](../../../../download/?processing). [Please download Processing v1.5.1](https://processing.org/download/?processing "Link: https://processing.org/download/?processing") since that's known to work

You'll also need to download and install the ControlP5 library

[Click to download the ControlP5 library](http://www.sojamo.de/libraries/controlP5/)
Then click below to download the remap software

[EZ-Key_Remapper.zip](http://learn.adafruit.com/system/assets/assets/000/011/306/original/EZ-Key_Remapper.zip?1380305964)
Uncompress and open the remapper.pde in Processing. Plug in the USB console cable or FTDI adapter. Select **Sketch-\>Run** menu item and look in the debug window below, you should see **Found Serial Ports:** and then a list of ports. On Windows, it will be something like **COM1, COM2, COM3** etc. On Mac/Linux it will be something like **/dev/USBtty** or **/dev/cu.usbserial**

![](https://cdn-learn.adafruit.com/assets/assets/000/011/303/medium800/adafruit_products_portlist.png?1380305131)

Copy and paste the list into a notepad, now **File-\>Run** it again, this time with the USB console cable unplugged. The list should be one line shorter. In this case **COM3** is missing. That means that the cable name is **COM3**   
in the line

> myPort = new Serial(this, "COM3", 9600);

Change "COM3" to whatever the cable name is. Again, for Mac or Linux it will probably be **/dev/cu.something**   
  
Replug in the FTDI/Console cable.  
  
Select **File-\>Run** again to start the script with the correct /dev or COM port  
  
Now disconnect the red wire that is powering the EZ-Key, press and hold the Pair button on the module and reconnect the red wire. You should see:  
  

> **Adafruit Bluefruit HID 9/18/2013**  
>   
> **Remap ready!**

  
Appear in the bottom half of the screen. Now click that large gray square window to remap  
![](https://cdn-learn.adafruit.com/assets/assets/000/011/304/medium800/adafruit_products_gray.png?1380305382)

You should see

> **OK**  
>   
> **Set Mapping:128**

  
Indicating that the mapping was sent.  
![](https://cdn-learn.adafruit.com/assets/assets/000/011/305/medium800/adafruit_products_remapped.png?1380305396)

# Customizing Keys
  
OK now you want to actually change the key report. Each of the 12 keys has a report. This is an example for #0:  
  
**hid\_keys.set\_key\_report(0, MODIFIER\_NONE, KEY\_A, KEY\_NONE, KEY\_NONE, KEY\_NONE, KEY\_NONE, KEY\_NONE);**  
  
There are 8 'arguments' to each report:  
  
The first one is the GPIO#, in this case its **#0**.   
  
Second is the modifier keys, such as Shift, Control, Alt, etc. See **hid\_keys.pde** for a list of the modifier available. You can 'or' the modifiers. For example, if you want to press shift and control modifiers at the same time, use **MODIFIER\_SHIFT\_LEFT | MODIFIER\_CONTROL\_LEFT**  
  
The last 6 are the 6 slots available for concurrent keys. You can have up to 6 key-codes sent at once (handy for when you want to send complex key reports. Check **hid\_keys.pde** for the list of all the keycodes!  
# Introducing Bluefruit EZ-Key

## Remapping the Buttons (Wireless)

The default buttons-\>keypresses will be satisfactory for most projects. However, you may want to customize those keys so when a GPIO pin is pulled to ground, a different keystroke is sent. It isn't that difficult to do!  
  
**Bluefruit v1.1** (Oct 22, 2013 or later) supports over-the-air key remapping **and** also you can map the pins to mouse movement or mouse clicks  
  
**Bluefruit v1.2** (Nov 7 2013 or later) - We have added support for mapping buttons to some "Consumer Report" keys, also known as Multimedia buttons. You can use the graphical remapper for the consumer keys.  
  
Over-the-air remapping is suggested since there's no wiring required and you can do it at any time. You just need to make sure the Bluefruit is paired to your computer. It's been tested on Mac and Windows but should also work on Linux.  
  
[You'll need to install Processing v1.5.1 to run the remapper.](https://processing.org/download/?processing "https://code.google.com/p/processing/downloads/list")We suggest 1.5.1, 2.0+ may not work. If v1.5 is giving you problems, though, try v2!

You will also need to download and install the ControlP5 library:

Danger: 

[Download the ControlP5 LIbrary](http://www.sojamo.de/libraries/controlP5/)
Then download the zip with the wireless remapper code

[GUI EZ-Key Remapper 12/20/2013](http://learn.adafruit.com/system/assets/assets/000/013/042/original/GUI_EZKey_remapper_12-20-13.zip?1387568625)
Uncompress and open the **GUI\_EZKey\_remapper.pde** in Processing.   
Make sure the Bluefruit is paired to your computer, since we need to be paired in order to send it the new keycodes  
  
Select **Sketch -\> Run** or click the play button to start the graphical remapper  
  
You can now select the pins and then using the menus below select what mouse/keyboard/consumer reports you want. Mouse reports can be X movement, Y movement, wheel, and three different buttons in any combination. Keyboard reports can be up to 6 keystroke commands, with modifiers, ascii-type, non-printing, etc. Consumer reports are special commands, such as volume up, volume down, iPhone keyboard display/hide and cannot be mixed or combined unlike mouse & Keyboard.   
  
You can also save and load your keymap which is handy for trying out different mappings!

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/012/185/medium800/adafruit_products_guiremap.png?1384046844)

When you're done, click **SEND\_MAP** to send it to your Bluefruit. In the main Processing window you should see the text report indicate that it found a Bluefruit and also that it sent data with a **Checksum Match**

# "Text style" over-the-air remapper
The original remapper is a Processing sketch that requires editing the reports by hand. While this is the most powerful, most people may be happier with the graphical remapper above. Still, for more advanced users, you can edit the reports per button with more flexibility here.  
[HID_EZKey_remapper.zip](http://learn.adafruit.com/system/assets/assets/000/011/817/original/HID_EZKey_remapper.zip?1382476709)
Uncompress and open the **HID\_EZKey\_remapper.pde** in Processing.   
Make sure the Bluefruit is paired to your computer, since we need to be paired in order to send it the new keycodes  
  
Select **Sketch -\> Run** or click the play button  
  
You should see the text report indicate that it found a Bluefruit and also that it sent data with a **Checksum Match**

![](https://cdn-learn.adafruit.com/assets/assets/000/011/815/medium800/adafruit_products_foundbluefruit.gif?1448054383)

![](https://cdn-learn.adafruit.com/assets/assets/000/011/816/medium800/adafruit_products_checksumok.gif?1448054377)

That's it, you can use it immediately with the new keymap!

# Introducing Bluefruit EZ-Key

## FAQ

### 

Bluefruit requires ~3VDC, there's an onboard regulator for providing nice clean power. It draws 25mA at all times while paired and an extra 2mA on average during transmission  
  
When the module is in Reset mode (Reset tied low) it draws 2-3mA quiescent.

### 

For Bluefruit v1.0, latency is about 100-120ms. For v1.1 and later (October 22, 2013) latency is 25-35ms. There is some 'jitter' in the latency but we find its not that noticeable.

### 

There is no way to re-program or update Bluefruit modules internal firmware - the key remapping is changing the EEPROM data, not the program storage.

### 

There's some issues with Android 4.1 thru 4.4 that cause Bluetooth to act odd due to WiFi interference. Try turning off WiFi to see if that helps. [[check this post for details!](https://forums.adafruit.com/viewtopic.php?f=22&t=53205&p=269547#p269547 "Link: https://forums.adafruit.com/viewtopic.php?f=22&t=53205&p=269547#p269547")]

# Introducing Bluefruit EZ-Key

## Downloads

# Files

- [Fritzing object in Adafruit Fritzing library](https://github.com/adafruit/Fritzing-Library/)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-Bluefruit-EZ-Key-PCB)

# Schematic
![](https://cdn-learn.adafruit.com/assets/assets/000/035/896/medium800/adafruit_products_schem.png?1474568183)

# Fabrication Print
![](https://cdn-learn.adafruit.com/assets/assets/000/035/897/medium800/adafruit_products_fab.png?1474568212)


## Featured Products

### Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller

[Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller](https://www.adafruit.com/product/1535)
Create your own wireless Bluetooth keyboard controller in an hour with the Bluefruit EZ-Key: it's the fastest, easiest and bestest Bluetooth controller. We spent years learning how to develop our own custom Bluetooth firmware, and coupled with our own BT module hardware, we've created...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1535)
[Related Guides to the Product](https://learn.adafruit.com/products/1535/guides)
### Xinghuatian Tech Bluetooth® 4.0 USB Module

[Xinghuatian Tech Bluetooth® 4.0 USB Module](https://www.adafruit.com/product/1327)
Add Bluetooth® capability to your computer super fast with a Xinghuatian Tech Bluetooth® 4.0 USB Module. This adapter is backwards compatible with v2.1 and earlier, but also supports the latest v4.0/ Bluetooth® Low Energy. Inside lies a <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1327)
[Related Guides to the Product](https://learn.adafruit.com/products/1327/guides)
### USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi

[USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi](https://www.adafruit.com/product/954)
The cable is easiest way ever to connect to your microcontroller/Raspberry Pi/WiFi router serial console port. Inside the big USB plug is a USB\<-\>Serial conversion chip and at the end of the 36" cable are four wire - red power, black ground, white RX into USB port, and green TX out...

In Stock
[Buy Now](https://www.adafruit.com/product/954)
[Related Guides to the Product](https://learn.adafruit.com/products/954/guides)
### FTDI Serial TTL-232 USB Cable

[FTDI Serial TTL-232 USB Cable](https://www.adafruit.com/product/70)
Just about all electronics use TTL serial for debugging, bootloading, programming, serial output, etc. But it's rare for a computer to have a serial port anymore. This is a USB to TTL serial cable, with a FTDI FT232RL usb/serial chip embedded in the head. It has a 6-pin socket at the end...

In Stock
[Buy Now](https://www.adafruit.com/product/70)
[Related Guides to the Product](https://learn.adafruit.com/products/70/guides)
### FTDI Friend with Micro USB Port + extras

[FTDI Friend with Micro USB Port + extras](https://www.adafruit.com/product/284)
Long gone are the days of parallel ports and serial ports. Now the USB port reigns supreme! But USB is hard, and you just want to transfer your every-day serial data from a microcontroller to computer. What now? Enter the FTDI Friend!

The FTDI Friend is a tweaked out FTDI FT232RL chip...

In Stock
[Buy Now](https://www.adafruit.com/product/284)
[Related Guides to the Product](https://learn.adafruit.com/products/284/guides)

## Related Guides

- [Adafruit HUZZAH32 – ESP32 Breakout Board](https://learn.adafruit.com/huzzah32-esp32-breakout-board.md)
- [XBee Radios](https://learn.adafruit.com/xbee-radios.md)
- [How to Find Hidden COM Ports](https://learn.adafruit.com/how-to-find-hidden-com-ports.md)
- [Building and Running MicroPython on the ESP8266](https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266.md)
- [Adafruit USB Power Gauge Mini-Kit](https://learn.adafruit.com/adafruit-usb-power-gauge-mini-kit.md)
- [Adafruit HUZZAH ESP8266 breakout](https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout.md)
- [Internet of Things Printer](https://learn.adafruit.com/internet-of-things-printer.md)
- [Home Automation in the Cloud with the ESP8266 & Adafruit IO](https://learn.adafruit.com/home-automation-in-the-cloud-with-the-esp8266-and-adafruit-io.md)
- [CircuitPython Libraries on Linux and ODROID C2](https://learn.adafruit.com/circuitpython-libaries-linux-odroid-c2.md)
- [Bootloading Basics](https://learn.adafruit.com/bootloader-basics.md)
- [Trinket Powered Analog Meter Clock](https://learn.adafruit.com/trinket-powered-analog-meter-clock.md)
- [DC & USB Boarduino Kits](https://learn.adafruit.com/boarduino-kits.md)
- [FTDI Friend](https://learn.adafruit.com/ftdi-friend.md)
- [Adafruit MENTA Kit](https://learn.adafruit.com/adafruit-menta-kit-mint-tin-arduino-compatible.md)
- [Trinket / Gemma IR Control](https://learn.adafruit.com/trinket-gemma-ir-remote-control.md)
