I have a strange problem with inserting backslashes (Ubuntu 10.10 and 11.04, the upgrade changed nothing). The key combination on my keyboard (Swedish Thinkpad T400) is AltGr + ?. However, this seems not to be the problem, as it only appears with some programs.
With for instance bash 4.2, python 2.7, python 3.2, swipl 5.10 I cannot type nor copy-paste backslash into the terminal. With ash, csh, ghci, nano, vi, idle, idle3 everything behaves as expected, I can both type and copy-paste. For instance, copying
echo gurka\\\\agurk
(four literal backslashes) and pasting it into csh (and then hitting enter), I get
$ csh
% echo gurka\\\\agurk
gurka\\agurk
but with bash, I get
$ echo gurkaagurk
gurkaagurk
Unfortunately, I noticed first quite a while after many new installations and I can't tell when it first appeared. I suspect a bug or conflicting configuration of some library common to the first group but not to the second, but I am unsure on how to go on. It is extremely annoying and I am grateful for hints.
UPDATE: the behaviour is the same for konsole and whatever you get with Ctrl-Alt-F1 (which is what I had tested). It also does not work with gnome-terminal and xterm, but these two indicate error (by flashing). Ideas about what to check?
UPDATE: Problem is solved, thanks to Gilles! It was a misconfiguration of the readline library (.inputrc)
Marcus