Rewrite xterm-keys code (both input and output) so that works (doesn't always output the same modifiers, accepts all the possible input keys) and is more understandable.