docstr: Convert Matplotlib key presses to GTK+ accelerator identifiers.
  
  Related to `FigureCanvasGTK4._get_key`.
docstr_tok: ["Convert","Matplotlib","key","presses","to","GTK+","accelerator","identifiers",".","Related","to","`","FigureCanvasGTK4._get_key","`","."]
code: def _normalize_shortcut(self, key):
      """
      Convert Matplotlib key presses to GTK+ accelerator identifiers.
  
      Related to `FigureCanvasGTK4._get_key`.
      """
      special = {
          "backspace": "BackSpace",
          "pagedown": "Page_Down",
          "pageup": "Page_Up",
          "scroll_lock": "Scroll_Lock",
      }
  
      parts = key.split("+")
      mods = ["<" + mod + ">" for mod in parts[:-1]]
      key = parts[-1]
  
      if key in special:
          key = special[key]
      elif len(key) > 1:
          key = key.capitalize()
      elif key.isupper():
          mods += ["<shift>"]
  
      return "".join(mods) + key
  
imports: import functools
  import io
  import os
  import matplotlib
  from matplotlib import _api, backend_tools, cbook
  from matplotlib.backend_bases import ToolContainerBase, KeyEvent, LocationEvent, MouseEvent, ResizeEvent, CloseEvent
  from gi.repository import Gio, GLib, Gtk, Gdk, GdkPixbuf
  from .None import _backend_gtk
  from ._backend_gtk import _BackendGTK, _FigureCanvasGTK, _FigureManagerGTK, _NavigationToolbar2GTK, TimerGTK
label_desc: Use image node_id 1 for calling the HelpGTK4 obj's underlying member method code with example usage: obj._normalize_shortcut(key) and returns: unknown