Merge remote-tracking branch 'origin/farm/316bc3ee/fix-tui-image-paste'

This commit is contained in:
can1357
2026-06-02 18:14:04 +02:00
4 changed files with 42 additions and 20 deletions
@@ -58,6 +58,13 @@ declare module "@oh-my-pi/pi-tui" {
interface Keybindings extends AppKeybindings {}
}
/**
* Resolve default image-paste shortcuts for the current terminal platform.
*/
export function getDefaultPasteImageKeys(platform: NodeJS.Platform = process.platform): KeyId[] {
return platform === "win32" ? ["ctrl+v", "alt+v"] : ["ctrl+v"];
}
/**
* All keybindings definitions: TUI + app-specific.
*/
@@ -120,7 +127,7 @@ export const KEYBINDINGS = {
description: "Dequeue message",
},
"app.clipboard.pasteImage": {
defaultKeys: process.platform === "win32" ? "alt+v" : "ctrl+v",
defaultKeys: getDefaultPasteImageKeys(),
description: "Paste image from clipboard",
},
"app.clipboard.pasteTextRaw": {