Skip to content

Commit 4236aa6

Browse files
aldergclaude
andcommitted
fix: intercept Ctrl/Cmd+Shift+V for paste without formatting [#2380]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ddaa229 commit 4236aa6

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/main/electron.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,18 @@ function createWindow (opt = {})
235235

236236
mainWindow.loadURL(ourl)
237237

238+
// Intercept Ctrl/Cmd+Shift+V before it reaches the renderer
239+
// so paste-without-formatting works even when the web app captures the shortcut
240+
mainWindow.webContents.on('before-input-event', (event, input) =>
241+
{
242+
if (input.type === 'keyDown' && input.key === 'v' &&
243+
input.shift && (isMac ? input.meta : input.control) && !input.alt)
244+
{
245+
event.preventDefault();
246+
mainWindow.webContents.pasteAndMatchStyle();
247+
}
248+
});
249+
238250
// Open the DevTools.
239251
if (__DEV__)
240252
{

0 commit comments

Comments
 (0)