There's also an addon called Binder which works well for this. It's out of date but works fine (and if you want to you can fix that by updating the version number in the addon, since that's the only difference).
Unlike Vortan's keybinder it saves sets of keybindings. You set up the ones you want and type '/binder save [name]' (with [name] being the name you want to give it) and then when you want to load those ones you just type '/binder load [name]' and it changes them all. So for example if I start a new character I just have to type '/binder load Main' and I've got all the keybindings I normally use.