Not quite what I'm looking for, but a slight improvement. I'd like to remap Up and Down from cycling the command history.
It's not getting into chat too easily -- it's too easy to repeat a command while in chat...
I was having trouble with this too- it is because the chat control buttons are also being used for movement, depending on that tricky "chat toggle." Using W-A-D-S for movement has the same issue- I'd accidentlly be saying "www" when I didn't mean to.

I have just now remapped my movment keys to one that are never used in chat (Home-Del-End-Pg Down], and moved the camera Look Up/Down commands to Insert and Pg Up - hopefully I this will work better and save me some goofs!

Ideally, there would be a part of the keyboard reserved for movement alone...
*edited for cold-fingered typos and such*