function cmKeyToVimKey(key, modifier) {
        var vimKey = key;
        if (isUpperCase(vimKey) && modifier == 'Ctrl') {
            vimKey = vimKey.toLowerCase();
        }
        if (modifier) {
          // Vim will parse modifier+key combination as a single key.
          vimKey = modifier.charAt(0) + '-' + vimKey;
        }
        var specialKey = ({Enter:'CR',Backspace:'BS',Delete:'Del'})[vimKey];
        vimKey = specialKey ? specialKey : vimKey;
        vimKey = vimKey.length > 1 ? '<'+ vimKey + '>' : vimKey;
        return vimKey;
      }
Handle the raw key event from CodeMirror. Translate the
Shift + key modifier to the resulting letter, while preserving other
modifers.