docs: def key_event_to_name(event):
      """ Converts a keystroke event into a corresponding key name.
      """
      key_code = event.key()
      modifiers = event.modifiers()
      if modifiers & QtCore.Qt.KeypadModifier:
          key = keypad_map.get(key_code)
      else:
          key = None
      if key is None:
          key = key_map.get(key_code)
   
      name = ''
      if modifiers & QtCore.Qt.ControlModifier:
          name += 'Ctrl'
   
      if modifiers & QtCore.Qt.AltModifier:
          name += '-Alt' if name else 'Alt'
   
      if modifiers & QtCore.Qt.MetaModifier:
          name += '-Meta' if name else 'Meta'
   
      if modifiers & QtCore.Qt.ShiftModifier and ((name != '') or (key is not None and len(key) > 1)):
          name += '-Shift' if name else 'Shift'
   
      if key:
          if name:
              name += '-'
          name += key
      return name