From eb09a95a64aa7aec6b06b488b291b1c787f1711f Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Wed, 7 Oct 2026 17:30:28 +0200 Subject: [PATCH] gui: remove cut/copy/paste from prompt input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove cut/copy/paste menu items from context menu - Remove paste button (📋) from input row - Remove B1+B2/B1+B3 chord handling for cut/paste - Simplify mouse handling to just B2=exec, B3=plumb - Standard Ctrl+X/C/V still work via TextArea defaults --- kde/gui/ChatPane.qml | 73 ++------------------------------------------ 1 file changed, 2 insertions(+), 71 deletions(-) diff --git a/kde/gui/ChatPane.qml b/kde/gui/ChatPane.qml index b23e382..ca03725 100644 --- a/kde/gui/ChatPane.qml +++ b/kde/gui/ChatPane.qml @@ -406,7 +406,7 @@ Item { if (!ollie.activeSessionId) return "No session" if (!ollie.activeAgentId) return "No agent" if (ollie.activeSessionPaused) return "Session paused" - return "B1=sel B2=exec B3=plumb B1+B2=cut B1+B3=paste" + return "B1=sel B2=exec B3=plumb" } enabled: ollie.daemonConnected && ollie.activeSessionId !== "" && ollie.activeAgentId !== "" && !ollie.activeSessionPaused wrapMode: TextEdit.Wrap @@ -432,12 +432,10 @@ Item { } } - // Acme-style mouse chording overlay + // Acme-style mouse handling overlay // B1 = select (handled by TextArea) // B2 = execute selection // B3 = plumb selection / context menu - // B1+B2 = cut (snarf) - // B1+B3 = paste MouseArea { id: chordArea anchors.fill: parent @@ -445,46 +443,12 @@ Item { propagateComposedEvents: true cursorShape: Qt.IBeamCursor - // Track if B1 (left) is currently held for chord detection - property bool leftHeld: false - - // We can't directly detect B1 here since TextArea handles it, - // but we can check mouse.buttons in the handlers - onPressed: function(mouse) { - // Check if this is a chord (B1 already held) - if (mouse.buttons & Qt.LeftButton) { - leftHeld = true - if (mouse.button === Qt.MiddleButton) { - // B1+B2 = cut - promptInput.cut() - mouse.accepted = true - return - } else if (mouse.button === Qt.RightButton) { - // B1+B3 = paste - promptInput.paste() - mouse.accepted = true - return - } - } - leftHeld = false - mouse.accepted = false // Let it propagate for non-chord - } - onClicked: function(mouse) { - // Only handle non-chord clicks - if (leftHeld) { - leftHeld = false - return - } - if (mouse.button === Qt.MiddleButton) { // B2: Execute selection as prompt var sel = promptInput.selectedText if (sel && sel.trim() !== "") { ollie.submit(sel.trim()) - } else { - // No selection - paste from clipboard and execute? - // Or just ignore. For now, ignore. } } else if (mouse.button === Qt.RightButton) { // B3: Plumb selection or show context menu @@ -496,10 +460,6 @@ Item { } } } - - onReleased: { - leftHeld = false - } } Menu { @@ -521,22 +481,6 @@ Item { } } MenuSeparator {} - MenuItem { - text: "Cut (B1+B2)" - enabled: promptInput.selectedText.length > 0 - onTriggered: promptInput.cut() - } - MenuItem { - text: "Copy" - enabled: promptInput.selectedText.length > 0 - onTriggered: promptInput.copy() - } - MenuItem { - text: "Paste (B1+B3)" - enabled: promptInput.canPaste - onTriggered: promptInput.paste() - } - MenuSeparator {} MenuItem { text: "Select All" onTriggered: promptInput.selectAll() @@ -544,19 +488,6 @@ Item { } } - // Paste button (mouse-first workflow) - ToolButton { - text: "📋" - font.pixelSize: 14 - implicitWidth: 36 - implicitHeight: 36 - Layout.alignment: Qt.AlignBottom - enabled: promptInput.enabled - onClicked: promptInput.paste() - ToolTip.visible: hovered - ToolTip.text: "Paste from clipboard" - } - // Send button (larger touch target) Button { text: "▶"