Function matchDrawingShortcut

  • The id of the tool whose shortcut matches this key event, or null.

    Pure, so a host can bind one keydown listener and decide for itself when shortcuts apply. The library installs no listener, because only the host knows whether the chart has focus, a dialog is open, or the user is typing.

    Modifiers must match exactly: Alt+T will not fire for Ctrl+Alt+T, so a tool shortcut cannot shadow a browser or host chord. metaKey (Cmd) is treated as Ctrl, which is what a Mac user expects.

    Parameters

    Returns string | null