Even though it's still a bit more intensive than plugging in and typing, the tweakers at Perceptive Development have managed to get an external keyboard working via a custom connection built for the headphone jack.
It's a progression of their previous project which added an RS232 serial modem interface to the iPhone's headphone jack—a dream of those who've spent most of their life huffing solder fumes. Serial interfaces can be mated to a world of electronics components cheaply and easily, and the headphone jack in/out hardware is one of the few interfaces that's open in the official SDK.
Here they've built a microcontroller that converts input from an external Targus IR keyboard into a format the iPhone's headphone jack can understand, which is then fed to a terminal app that doesn't require jailbreak. Pretty cool.