// packages/block-editor/src/components/rich-text/event-listeners/remove-browser-shortcuts.js
import { isKeyboardEvent } from "@wordpress/keycodes";
import { privateApis as composePrivateApis } from "@wordpress/compose";
import { unlock } from "../../../lock-unlock.mjs";
var { subscribeDelegatedListener } = unlock(composePrivateApis);
var remove_browser_shortcuts_default = () => (node) => {
  function onKeydown(event) {
    if (isKeyboardEvent.primary(event, "z") || isKeyboardEvent.primary(event, "y") || isKeyboardEvent.primaryShift(event, "z")) {
      event.preventDefault();
    }
  }
  return subscribeDelegatedListener(node, "keydown", onKeydown, true);
};
export {
  remove_browser_shortcuts_default as default
};
//# sourceMappingURL=remove-browser-shortcuts.mjs.map
