Use a MIDI device as a mouse or keyboard

Are you looking for a way to turn a MIDI controller into a mouse and/or keyboard (USB HID)?

Do you have an Arduino Yun?

Check out my project

This code turns a Launchpad S from Ableton into a USB HID device by emulating both a mouse and keyboard. The mappings can get used to play “WASD and mouse” based games (most first-person games on PC). The MIDI mappings could get easily modified to work with any MIDI controller and game.

Preparing your Arduino Yun

  • Install latest OpenWRT (OpenWrt-Yun 1.5.3) via
  • Setup WLAN, insert SD Card and expand disk with the DiskSpaceExpander sketch (
  • Restart and wait until the white USB LED is on (indicates Linux boot completed)
  • Connect via SSH (e.g. via Putty)
  • Run the following commands
    opkg update// install pip and pyserial
    opkg install distribute
    opkg install python-openssl
    easy_install pip
    pip install pyserial// install soundcard and alsa utils
    opkg install kmod-sound-core
    opkg install kmod-usb-audio
    opkg install alsa-utils
    opkg install alsa-utils-seq
  • Download midi2hid.ino and from¬†
  • Install the midi2hid.ino sketch via Arduino IDE
  • Transfer to the YUN (e.g. via WinSCP)
  • Un-power the YUN
  • Plug your MIDI controller into the USB port
  • Plug the YUN into the computer you want to control via HID using the micro-USB port
  • Re-power the YUN and wait for the white USB light to come on again
  • Connect via SSH (e.g. via Putty) and run