Personally I'd probably go for the keyboard because I think I would have more fun with it. Which one do you think you would use longer and you'd enjoy more?
Went looking at guitars today and most ppl recommended I start with an acoustic before I go electric. So its a longer route to learn than a keyboard.
I can get a good 61 key casio keyboard which my daughter and I can learn on, plus its MIDI so I can eventually plug it into the computer to use with Ableton or other software. So its looking like a good bet.
Also considering the price of an entry-level electric guitar and amp set, i could get the keyboard and even a second hand acoustic guitar if I was so inclined.
I'd say go for the keyboard. They have memory banks where you could program the sound to come out as a guitar But with the computing power of keyboards and synthesizers you have a lot of flexibility. Essentially you could take a mid-ranged (feature and pricewise) keyboard and set it to precussion and lay down a beat track. Save that and lay down a rhythm, lead and bass guitar. Then You could put in regular piano and at the end you have yourself a 1 person band. Get a microphone and a recorder added to the fact that you're thinking about using the MIDI port and you could master all the sound levels, mix it down add in vocals and have a full on production going on Guitars are awesome but a bit difficult to leard. For me it was the fact that there were so many places to position your fingers and so many different ways to strum the strings plus the constant tuning of it made it hard for me to just enjoy playing a song. I always got frustrated with it. I eventually did learn pretty well but it took some time. A keyboard on the other hand offers you a multitude of options. Not just a piano sound so you can have a lot of fun with it. Kind of like getting a lot of different instruments in one. Plus there's only one way to read the sheet music and play it Either way they all are fun. Especially when you get good. Then you can amaze your friends and family hehe Good luck with whichever you choose.