How can I stop using a mouse while programming in my IDE?
Move it to the wrong side (eg if you are right handed then put it on the left of the keyboard). That way, you can still use it if necessary, but you should find you aren't using it unecessarily.
If changing sides isn't enough to confuse your brain, then moving it to a place where it is accessible but you have to think before reaching for it. As long as you can't reach for the mouse without thinking about it, then you will find that it is easier to use keyboard shortcuts instead. Essentially you want the mouse to be an option but the keyboard to be a better/easier/more convenient one!
As for pitfalls, well you may find that if you have to test any interfaces (web based or dektop) that you need to revert back to using the mouse. Also I find that if I have to work outside of the IDE, then it is just not as efficient to do without the mouse. Often we use WOrd for specifications and documentation, and trying to get away with using that without a mouse, is tricky (in my experience).
Another potential source of annoyance, is when switching between applications (Eclipse, VS, etc), you find that they often use different keyboard shortcuts, and so it can take a while to get back up to speed again, or you have to spend some time reconfiguring the shortcuts to be consistent.
Unplug it.
If your mouse is completely gone then you will be forced to learn how to live without it and therefore will become productive without it.
Learn the keyboard short cuts :)
Also some editors are better suited for mouse free operation. I use ViEmu with Visual Studio which has helped me reduce, but not eliminate the need for using the mouse.
Anytime you're about to use the mouse, forcibly stop yourself and look up the keyboard shortcut for that operation. Do that a few times per operation and soon your muscle memory will kick in and you won't even have to think about it anymore.