Switch keyboard when phone in dock?

I love using the swype keyboard, but when I'm driving I like to use the 2.1 keyboard with voice input. Is there anyway to set it up so the keyboard can automatically change depending if the phone is docked?