// packages/block-editor/src/components/rich-text/event-listeners/shortcuts.js
import { privateApis as composePrivateApis } from "@wordpress/compose";
import { unlock } from "../../../lock-unlock.mjs";
var { subscribeDelegatedListener } = unlock(composePrivateApis);
var shortcuts_default = (props) => (element) => {
  const { keyboardShortcuts } = props.current;
  function onKeyDown(event) {
    for (const keyboardShortcut of keyboardShortcuts.current) {
      keyboardShortcut(event);
    }
  }
  return subscribeDelegatedListener(element, "keydown", onKeyDown, true);
};
export {
  shortcuts_default as default
};
//# sourceMappingURL=shortcuts.mjs.map
