iOS5.1+ iPhone/iPad
(Requires Latest version of GarageBand from AppStore)
Use GarageBand for iOS as a MIDI keyboard and take advantage of its cool features, including various kinds of virtual instruments and perfect velocity sensitivity.
Although this tweak can't be on a par with those advanced MIDI keyboards, it is best for music amateurs who can't afford a real MIDI keyboard or whoever need a most portable MIDI keyboard.
--- Setup ---
* Cable. Please google "iRig MIDI" or "Alesis IO Dock" for more information. iPhone 5, iPod touch 5th generation, iPad 4th generation and iPad mini maybe need Apple's Lightning to 30-pin Adapter as well.
* Wi-Fi. Mac users please use Audio MIDI Setup.app. Windows users please check out rtpMIDI.