Rewrite "return to normal" mode function

Now there should be no annoying side effects with
the escape sequence 'fd'. It should also work for
custom sequences.