Skip to content

Bluetooth keyboard pairing without code entry

by Layne on June 14, 2010

This post explains how to connect a Bluetooth keyboard to your Linux/Mac/Windows computer without having to enter a pairing code. This is useful if you have a broken key on your keyboard, if you want to automate the pairing from a script, or you are building a custom keyboard that doesn’t have all the number keys connected (that’s me!).


Ubuntu Linux LogoBased on the Ubuntu Community Documentation for Bluetooth Setup, these commands were tested on Ubuntu Lucid Lynx 10.4, but should work on other version of Linux provided you can figure out how to install the necessary Bluetooth utilities.

First, we need to scan the available devices. Make sure your keyboard is in discoverable mode (push the button) before running the scan command.

matthew@broderick:~$ hcitool scan
Scanning ...
        00:12:A1:63:34:6E    BluePacket Bluetooth Wireless Keyboard

This provides us with the device ID, similar to the MAC address of a network card. Copy this code to the clipboard for the next command. We need the hidd command, which is part of the bluez-compat package. On Ubuntu, you can install it with this command:

matthew@broderick:~$ sudo apt-get install bluez-compat

Next, we need to manually connect to the keyboard device ID:

matthew@broderick:~$ sudo hidd --connect 00:12:A1:63:34:6E

After this command finishes, your keyboard should be working with Linux. Try typing characters into vim or gedit, to make sure it’s working properly. Congratulations!

Windows 7

Windows 7 LogoThis solution was found at one of the Microsoft support forums. I know, I had no idea that Microsoft had support forums, either. Even more surprisingly, I was able to obtain useful information from a Microsoft webpage. To start, open up the Control Panel, and go to “Hardware and Sound”. Select “Add a Bluetooth device”:

When Windows is searching for your Bluetooth devices, put your keyboard into pairing mode (press the button). When it shows up in the list, don’t double click it! Instead, right-click on the keyboard device and select “Properties”:

In the window that opens, “Keyboard Properties”, wait a couple seconds for the services panel to load. Once it has loaded, check the box for “Drivers for keyboard, mice, etc. (HID)”. Click on “OK” to close the window.

Windows will load the drivers for your keyboard. After everything settles down, your keyboard should be working with Windows. Try typing characters into Notepad, to make sure it’s working properly. Congratulations!


Apple LogoDespite a couple hours of searching the web and trying all possible menu options, I was unable to figure out how to pair a bluetooth keyboard without having to type in a randomly-generated numeric passcode. If you know how to do get around this, please leave a comment below. Thanks!

From → Uncategorized

59 Comments Leave one →

  2. Tova permalink

    Thank you so much!!! I was having trouble pairing a bluetooth keyboard (that I use for my ipad) with my laptop on Windows 7 – it was asking me to type in the pairing code. I used your trick of right clicking and selecting properties. It installed the driver and is now working!!

    So happy because I started getting carpal tunnel syndrome in my dominant hand, and with this wireless keyboard I can place it in a better position for my hands.

    Thanks again, so grateful!

  3. jjm789 permalink

    This old article is the only one that got my laptop’s bluetooth connected to my vehicle radio. Windows 10 easily prompts for the pass key. But Windows 7 would not. So I could not transfer audio. It was tricky getting 7 to stream audio. But thanks to this article, I got it going. Thanks!

  4. cas permalink

    Perfect, thanks. Worked with windows 7, BKB800 generic china keyboard.

  5. JAVIER permalink

    This was the perfect solution after hours of trying to solve the problem of connecting a Bluetooth bar code scanner to my computer. The option to pair without pin code was grayed out and it was impossible to type a pin code. Thank you so much!!!

  6. Joseph Taylor permalink

    It worked thanks

  7. Uttara permalink

    Hi guys !!!! My enter key is not working and now my key board was unpaired while regretting it. Is there any similar solution for Mac os 10.13.6

    Please I am worried I will have to buy a brand new keyboard only for one key. Please help me out

  8. Andrew Przelucki permalink

    I have a headset that I could not pair with Windows or Linux. Turns out that such a headset must be paired without a password. Android has no problems with this, but Windows forces using a PIN each time, and this ruins the pairing. It’s not about any missing codecs, it’s not about missing features or anything else missing. It’s just that some Bluetooth devices must be paired without a password!

    So I just got my headset to connect to Windows 10! Here’s what I did on Windows:

    1) On the taskbar, right click the Bluetooth icon and select “Join a Personal Area Network”. That’s right – don’t go to the Settings app like you would normally do.

    2) Next, in the window that appears, click the button “Add a device”. Wait until the slider stops moving, select your device. In my case, it didn’t say the exact model, just generic headphones.

    3) When it shows a field to enter a PIN, don’t enter anything, just continue. In my case, my headset must not have a PIN given, then it pairs this way.

  9. Osamudiamen Ehanire permalink

    It worked, thank you so much

Leave a Reply

Note: HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS