Skip to content

EditShortcuts

Wire cmd/ctrl + A/C/V/X/Z/Y to native edit commands inside the webview.

Config keyedit_shortcuts
JS namespace— (no namespace)
CoreNo
PhasesWebviewInject
Hard deps
PlatformsmacOS · Linux · Windows

A passive plugin — injects a single keydown listener that maps the standard edit-action shortcuts (Select All, Copy, Paste, Cut, Undo, Redo) to document.execCommand. Nothing to configure; opt out via lune.yml if your app handles these keys itself.


What it does

Adds a top-level keydown listener:

ShortcutAction
cmd/ctrl + AselectAll
cmd/ctrl + Ccopy
cmd/ctrl + Vpaste
cmd/ctrl + Xcut
cmd/ctrl + Zundo
cmd/ctrl + shift + Zredo
cmd/ctrl + Yredo

The listener calls e.preventDefault() then document.execCommand(...). Any other key combination falls through to the page.


Disabling

yaml
plugins:
  disabled:
    - edit_shortcuts

Disable when your app already binds these shortcuts (e.g. a custom code editor view that needs raw cmd+Z semantics).


Platform notes

  • macOS — Verified.
  • Linux — Untested.
  • Windows — Verified.

Released under the MIT License.