geekhack Projects > Making Stuff Together!

USB to USB keyboard converter

(1/140) > >>

With this converter you can change keymap and use functions TMK firmware offers on your USB keyboard.

This project depneds heavily on USB Host Shield 2.0 library.

You have trouble or question? Ask in this thread.

- Use this firmware for debug
- And use hid_listen command to see its debug outputs.
- Let me know your keyboard model name, URL of the product page would be helpful to check its specifications and manuals.
- USB descriptor would be greatly helpful for debug.  Try USB Descriptor DumperNew! on your converter and share HEX dump.

You need USB host controller chip MAX3421e and AVR chip ATMega32U4.

1. TMK USB to USB converter
This small board is almost equivalent to USB Host Shield plus Leonardo. No soldering job is needed.

You can buy an assmebled converter here to support my project.

PCB design files are available.

Case design file is available here. Thank you, Gouty@github! 2018-10/27 New!

2. USB Host Shield 2.0 + Arduino Leonardo
Just plug USB Host Shield onto Arduino Leonardo, they are not small as keyboard converter but work well with default firmware.

a. USB Host Shield:
Clones may have compatiblity issues with the library and TMK. Not recommended.

b. Arduino Leonardo:

3. Mini USB Host Shield 2.0 + Pro Micro
Not supported by me but this should work too. Firmware may require small fix. See these references.

a. Mini USB Host Shield 2.0

b. Pro Micro or Teensy

This converter is part of TMK keyboard firmware project. Source code for the converter firmware is available here.

You can compile firmware from source code. See TMK documentation for the detail.
--- Code: ---$ git clone git://
$ cd tmk_keyboard
$ git submodule init
$ git submodule update
$ cd converter/usb_usb
$ make clean
$ make

--- End code ---

To reduce firmware size you can disable functions you don't use by commenting out following lines. Note that 'make clean' is needed after Makefile is editted.

NKRO is meaningless practically on this converter and it should be disabled always.

--- Code: ---# Build Options
#   comment out to disable the options.
MOUSEKEY_ENABLE ?= yes   # Mouse keys
EXTRAKEY_ENABLE ?= yes   # Media control and System control
CONSOLE_ENABLE ?= yes   # Console for debug
#COMMAND_ENABLE ?= yes    # Commands for debug and configuration
#NKRO_ENABLE ?= yes   # USB Nkey Rollover

--- End code ---

No idea? No problem, you can use easy TMK keymap editor instead, see below.

For TMK converter
First, press tiny button on TMK converter to turn it into program mode.
To program converter with your own firmware you can use 'dfu-programmer' tool.
--- Code: ---dfu-programmer atmega32u4 erase --force
dfu-programmer atmega32u4 flash <your_firmware.hex>
dfu-programmer atmega32u4 reset

--- End code ---

If you have installed build tools you can just 'make' like this.

--- Code: ---make dfu

--- End code ---

Or you can use 'Atmel FLIP' as well. Refer to this wiki page for other program tools.

For USB Host Shield 2.0 + Arduino Leonardo
MorePush reset button on Leonardo before run this command. Serial port name(COM17) depends your system. On Linux I got /dev/ttyACM0.

--- Code: ---$ DEV=COM17 make program
$ avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:usb_usb.hex -PCOM17

--- End code ---

TMK Keymap Editor
USB to USB converter supports TMK keymap editor now!

You can edit keymapping and get your custom firmware easily with this.

Start here: Default plain layout
Or SpaceFn layout example on Keymap Editor.


* Only supports 'HID Boot protocol'(6KRO) mode. Many of NKRO keyboards still can work in 6KRO mode. (Confirmed NKRO keyboards: see 'Compatible Keyboards' list.)
* Media/System control keys on keyboard are not recognized by the converter. Note that you can still send them with TMK firmware by remapping keys.
* 'Fn' key on keyboard is not recognized. In most case keyboards don't spit out scancode for 'Fn' key. You cannot remap the 'Fn' key itself.
* Firmware size. USB to USB converter uses alot of flash space to support USB keyboard. Some combination of TMK features can not fit into MCU flash size(28KB). To reduce firmware size you have to disable some of features you don't use, see 'Firmware' section above.
* No mouse or other pointing devices support. To support all pointing devices is difficult but it is possible to support one specific device if you are willing to write code for that.

Incompatible Keyboards
The converter doesn't work with:

* Varmilo VA87MR
* Sprit's PCB (Auto PS/2-USB mode selection doesn't work)
* GON's NerD
* Kinesis Advantage2 works with the latest fimrware, See this
* FC660C (it works now!)
* Realforce RGB (work around) Fixed now 2018-07-08
* GMK Cardreader Keyboard?(0744:0030)
* Tean Wolf
* Ace Pad
* X-Keys Foot Pedal XF-10-US
* G80-3000 with 2KRO(due to Cherry firmware bug) Patched for the bug. 2018-08-01
* Xiaomi Yuemi MK02S (Descriptor)
* Apple Magic keyboard(model A1644)Workaround
* Koolertron/Smartyao SMKD72
* IOGEAR GKB635W Wireless Smart TV Keyboard(Report protocol only. The converter won't support this.)
* iKKEGOL USB Double 2 Foot Switch
* Logitech G810 Orion Spectrum
* MK Fission(04b4:0823 Cypress)(Fixed. 2020-12)
* NuType F1 STALL error(Fixed. 2020-12)
* Rosewill RK-9200BR TOGGLE error(Fixed. 2020-12)
* Razer Huntsman Mini  (Fixed. 2020-12)
* Logitech G213 STALL error(Fixed? 2020-12)
* Unknown Gaming keyboard(04b4:3000 Cypress) TOGGLE error(Fixed. 2020-12)
* Ducky One 2 Mini New (2021-06-25)
* Dygma Raise Keyboard This doesn't support 'Boot keybaord protocol'. (The converter won't support unless its fimrware is changed.) New (2021-07-12)
As of 2020-12 the converter firmware received a few bug fixes on its USB stack which improved its keyboard compatibility greatly. Some of incompatibility keyboards listed here can work with the latest firmware probably, please try and report if you have any.

Use this firmware to get detailed debug outputs on hid_listen if your keyboard doesn't work. And post its outputs here.

Compatible Keyboards
If your keyobard works well with BIOS/EFI you can expect the converter handle it reasonably. But it is still not 100% assured, the covnerter can fail to handle the keyobard with some reasons unfortunately while the converter firmiware has been gradually updated to improve compatiblility.

* Realforce (86U, 87U, 91U)
* Realforce R2(R2TLSA-US4, R2TL-US3-IV)
* Realforce RGB followup 2021-07-24
* HHKB Professional(PD-KB300)
* HHKB Professional JP(PD-KB420)
* HHKB Professional 2(PD-KB400) working on USB Hub issue Fixed 2020-11
* HHKB Professional Classic(PD-KB401)
* Varmilo MA109C
* Lenovo SK-8855(ThinkPad keyboard. TrackPoint is not supported.)
* Cherry G80-3600
* Filco Majestouch2(Tenkeyless 87-key)
* Ducky One TKL
* Microsoft Sidewinder X4
* Novatouch TKL
* TMK Alps64
* Input Club/Massdrop Infinity 60%
* LinDon Tech 68 key
* Apple aluminium keyboard(A1243)(Fixed rollover error handling 2019-05)
* G80-3000
* HyperX FPS Pro keyboard
* Mionix Wei
* ikbc KD87
* Logitech Unifying Receiver K230 K330, K360, MX Keys, ERGO K860
* DXT28 Bluetooth HID Proxy dongle
* Matias Ergo Pro
* Fujitsu FMV-KB232
* Niz Atom66
* Kinesis Advantage(KB500USB)
* Kinesis Advantage2(KB600)
* ASUS Strix Tactic Pro (Note that its JIS version keyboard seems to have a glitch.)
* DSI Left Handed Keyboard
* Vortex Core
* Vortex Tab 90M
* GMK Uniqey C70
* Logitech K120
* Matias Quiet Pro for Mac
* GK64
* GH60
* Kbpardise v60
* Vortex pok3r
* Filco Majestouch 2 104
* NuType F1(Fixed STALL error. 2020-12)
* Rosewill RK-9200BR(Fixed Toggle error. 2020-12)
* MK Fission(04b4:0823 Cypress)(Fixed 2020-12)
* Razer Huntsman Mini  (Fixed. 2020-12)
* Unknown Gaming keyboard(04b4:3000 Cypress) (Fixed TOGGLE error. 2020-12)
* Ducky One 2 Skyline TKL
* Logitech G413 Probably.
* Logitech G213 Probably. Fixed STALL error(2020-12)
* Apple A1048
* Keychron K8
* compact GMMK
* Logitech G915 with the lightspeed receiver
* EpoMaker EP-84
* Truly Ergonomic
* Arkoncore AR87
* Apple Keyboard A1243
* Keychron k3 v2 2021-07-20

Report from you would be really appreciated. Please post your result in this thread.

2020/12 Fix STALL error
2020/11  Fix TAP_KEY
2020/11  Add Mechanical Locking Key support
2020/11  Fix TOGGLE error and HUBPRE bit.
2019/05  Fix startup stuck problem
2019/05  Fix Rollover error handling
2018/11  Update firmware(Use fixed LUFA stack and update USB_Host_Shield_2.0)
2018/11  Add Filco Majestouch2 87 and ikbc KD87 to compatility list
2018/07  Update  firmware to fix startup issue. see this commit.
2018/10  Add design file for enclosure
2018/02  Update "Reported keyboards" section
2017/05  Fix startup code for FC660C
2016/09  New keymap editor(unimap) is available
2016/01  Add Keymap editor
2015/12  Add Firmware size to limitations, and recommendation for genuine host shield
2015/11  Add keymap for JIS and ISO
2015/07  Bug fix for keyboard sending ErrorRollOver report
2015/07  Add Locking key indicator support
2015/06  Updated Limitation and TODO
2015/02  TMK USB to USB converter Rev.A
2014/12  Added Hub support(confirmed with HHKB pro2)

Nice! Interested in getting one...

Hasu, any chance you would build some of these to sell?

This is really great. I wanted to build one of these a while ago but I just couldn't find the time to follow through.  Looks fantastic!

I have spare PCBs and have a plan to get some of them assembled once I confirm it works well in the field after some daily usage.

Today, I found a bug :D


[0] Message Index

[#] Next page

Go to full version