// packages/block-editor/src/components/rich-text/event-listeners/shortcuts.js
var shortcuts_default = (props) => (element) => {
  const { keyboardShortcuts } = props.current;
  function onKeyDown(event) {
    for (const keyboardShortcut of keyboardShortcuts.current) {
      keyboardShortcut(event);
    }
  }
  element.addEventListener("keydown", onKeyDown);
  return () => {
    element.removeEventListener("keydown", onKeyDown);
  };
};
export {
  shortcuts_default as default
};
//# sourceMappingURL=shortcuts.js.map
