fix paste image on windows

This commit is contained in:
LaZzyMan 2026-02-02 17:07:39 +08:00
parent b28e5c4c0f
commit 1050163804
9 changed files with 169 additions and 402 deletions

View file

@ -79,6 +79,7 @@ export interface KeyBinding {
command?: boolean;
/** Paste operation requirement: true=must be paste, false=must not be paste, undefined=ignore */
paste?: boolean;
meta?: boolean;
}
/**
@ -153,10 +154,16 @@ export const defaultKeyBindings: KeyBindingConfig = {
{ key: 'x', ctrl: true },
{ sequence: '\x18', ctrl: true },
],
[Command.PASTE_CLIPBOARD_IMAGE]: [
{ key: 'v', ctrl: true },
{ key: 'v', command: true },
],
[Command.PASTE_CLIPBOARD_IMAGE]:
process.platform === 'win32'
? [
{ key: 'v', command: true },
{ key: 'v', meta: true },
]
: [
{ key: 'v', ctrl: true },
{ key: 'v', command: true },
],
// App level bindings
[Command.SHOW_ERROR_DETAILS]: [{ key: 'o', ctrl: true }],