def _revert_alt(keys):
    """TWC automatically changes a-key to a sequence of esc + key, because
    that's how shells work. We have to revert this, because it's internal
    implementation detail."""
    if len(keys) > 1 and keys[0] == 'escape':
        return 'a-{}'.format(''.join(keys[1:]))
    return keys
