I use Cygwin under Windows, and sometimes when I type Alt-B into my xterm window, instead of going back one word, I'll see a weird control-character, like this: â.
There are two ways I've found to fix this: one for an xterm that's already running, and one for launching future xterms without this problem.
For xterms that are already running:
- Left-click inside the xterm
- Hold down the Control key, then left-click and hold the left mouse button. This will bring up a context menu.
- Scroll down to "Meta sends escape" -- it's about halfway down
- Release the mouse button
- Edit the command-line you use to run xterm to include the following argument:
-xrm "xterm*VT100.metaSendsEscape: True"
Here's an example of a complete xterm command including that argument:
xterm +tb -xrm "xterm*VT100.metaSendsEscape: True"
This tells xterm it should convert "Alt-B" into a two-keystroke sequence: Escape, then B. It gets around systems where, for some reason, the keyboard-to-shell path is not 8-bit clean.