Merge remote-tracking branch 'origin/farm/316bc3ee/fix-tui-image-paste'
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user