Sharing keyboard and mouse with Mac and iphone 5
Try the Type2Phone app for the keyboard. It effectively turns your Mac into a Bluetooth keyboard that you can connect your iPhone to. Anything you type into the app gets sent to the phone.

Unfortunately there's no way to use a mouse to interact with the touch screen (and frankly, if you've ever used the iOS Simulator, you'd realize it's fairly limiting to do so), but Type2Phone should get most of what you're looking for.