Fix: Recognize m- and Esc etc

It works, but the code is rather messy.