Some emacs keyboard bindings that work in GUI mode won't work in terminal mode because the terminal only knows how to send ASCII control codes. Is there a way to get emacs to complain when I bind a key to a non-ASCII control code so I'll stop doing it by accident? I only run emacs in a terminal occasionally, and usually only remotely, and usually only because something is broken, which means I end up discovering this suckiness at the worst time.
I've also had experiences when remoting in, especially from one OS to another (e.g. Solaris -> Linux) where even modifier keys get remapped (esc <-> ctrl get swapped, or right alt works but left alt doesn't). Is there any way to detect when this is happening and swap my keyboard bindings appropriately?
Basically: it sucks that everytime I use emacs remotely in the terminal I get an inconsistent experience with the GUI, how can I change my emacs usage to prevent that.