BizarreKeyMappingIssue

Webs: Faemalia -:- Greatprawn -:- Playground -:- Technical -:- Tweak
Technical Web Sections: Register -:- Users -:- Changes -:- Index -:- Search -:- Statistics

Sometimes when I create a Linux box, when I start a shell and use the "Alt-." functionality (a BASH builtin, use "bind -p" to list all of them), I get a little (R) symbol instead of the final argument of the previous command.

Lately, this happened again when I installed a Debian box. So here is a list of random facts that hopefully will jog me into solving the problem:

Now some random facts about the problem on my Debian laptop:

Initial looks at environment variables, .profile, /etc/profile, /etc/bash.bashrc, etc don't reveal anything that would make this happen, which is okay, since I suspect it's an X thing.

RAWK! SethK is Da Man! He figured it out. This fixed my problem. Put this into ~/.Xdefaults (or however you want to set your Xterm defaults):

XTerm*VT100.Translations:       #override \
    Meta <KeyPress> period: string(0x1B) string(0x2E) \n

Note: The space before the "Meta" on the second line may need to be a literal tab character. If you don't want to restart X, do this:

xrdb -merge ~/.Xdefaults

SethK says this is probably more-generally solved by doing this:

XTerm.metaSendsEscape:          true

Although that might not work. He couldn't get it to work with a short couple tries:

(12:42:31) sethk_: bah, that doesn't work
(12:42:39) sethk_: heh, I did xrdb -all -remove
(12:43:45) sethk_: thought I had it. oh well, it must be being overridden by a translation
(12:44:25) sethk_: well, I give up on that, but if you need other
                   Alt+ mappings, you can use a similar pattern with the ASCII codes


Edit -:- Attach -:- Ref-By -:- Printable -:- More