
On Sat, May 25, 2013 at 03:43:53PM +1000, Tim Connors wrote:
On Sat, 25 May 2013, Craig Sanders wrote:
On Sat, May 25, 2013 at 10:44:09AM +1000, Tim Connors wrote:
Sometimes, after running *something* that I haven't identified yet, it
possibly something that output a Ctrl-O to switch to the "alternate" character set. Printing ^O again will switch it back.
Anyone know how to restore the previous mappings and/or identify what screws it up (presumably some damn ncurses crap)?
typing "^V^O<RETURN>" in a bash shell often fixes it when bash prints "bash: ^O: command not found" (where ^V and ^O are Ctrl-V and Ctrl-O respectively)
echo -e "\0017" works just as well. or any other method of outputting a Control-O
None of the above in this case (and of course, stty sane I had tried too)
(I hope my dynamic resetting of PROMPT_COMMAND and writing things to the terminal windowtitle and icon title values doesn't end up toggling ctrl-O an even number of times - I did try to temporarily unset my automatic voodoo)
running "reset" is also useful, and "stty sane" too, especially if the terminal is in non-echoing mode.
But reset worked, thanks. I wonder if there's a less drastic (ie, no screen & history clear) subset of what reset does that would help me. Unfortunately, I don't know how to toggle this xterm back into a fault state (since ctrl-O isn't working for me) to test.
This is an X thing. Some X program has re-mapped the action of the Cr keycode when augmented by Shift to send an escape sequence. Ncurses can't do this, and so can't undo it either. Reset works because xterm goes back to its initial keycode mappings. Keep an eye on which X (i.e. GUI) programs you run from your xterm to see if you can correlate which one causes the problem. Cheers ... Duncan.
i usually do all three in that order when my terminal goes weird (e.g. from accidentally catting a binary file)
Or the cat accidentally catting on the keyboard.
-- Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html