1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

clipboard: implement virtual-keyboard-unstable-v1 to replace wtype for

pasting entries
This commit is contained in:
bbedward
2026-07-04 16:23:50 -04:00
parent 81a4d3b4e0
commit fd99558ce5
24 changed files with 1383 additions and 715 deletions
@@ -396,7 +396,7 @@ Item {
}
sourceComponent: ClipboardKeyboardHints {
wtypeAvailable: modal.wtypeAvailable
pasteAvailable: modal.pasteAvailable
enterToPaste: SettingsData.clipboardEnterToPaste
}
}
@@ -496,7 +496,7 @@ Item {
implicitHeight: saveMenuPasteRow.implicitHeight + Theme.spacingS * 2
radius: Theme.cornerRadius
color: saveMenuPasteArea.containsMouse ? Theme.surfaceVariant : Theme.withAlpha(Theme.surfaceVariant, 0)
opacity: modal.wtypeAvailable ? 1 : 0.5
opacity: modal.pasteAvailable ? 1 : 0.5
Row {
id: saveMenuPasteRow
@@ -522,7 +522,7 @@ Item {
id: saveMenuPasteArea
anchors.fill: parent
hoverEnabled: true
enabled: modal.wtypeAvailable
enabled: modal.pasteAvailable
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: {
saveMenu.close();
@@ -21,7 +21,7 @@ FocusScope {
property string activeFilter: SettingsData.clipboardRememberTypeFilter ? SettingsData.clipboardTypeFilter : "all"
readonly property bool clipboardAvailable: ClipboardService.clipboardAvailable
readonly property bool wtypeAvailable: ClipboardService.wtypeAvailable
readonly property bool pasteAvailable: ClipboardService.pasteAvailable
readonly property int totalCount: ClipboardService.totalCount
readonly property var clipboardEntries: ClipboardService.clipboardEntries
readonly property var pinnedEntries: ClipboardService.pinnedEntries
@@ -5,10 +5,10 @@ import qs.Widgets
Rectangle {
id: keyboardHints
property bool wtypeAvailable: false
property bool pasteAvailable: false
property bool enterToPaste: false
readonly property string hintsText: {
if (!wtypeAvailable)
if (!pasteAvailable)
return I18n.tr("Ctrl+Tab: Switch Tab • Ctrl+S: Pin/Unpin • Shift+Del: Clear All • Esc: Close");
return enterToPaste ? I18n.tr("Ctrl+Tab: Switch Tabs • Ctrl+S: Pin/Unpin • Shift+Enter: Copy • Shift+Del: Clear All • F10: Help • Esc: Close", "Keyboard hints when enter-to-paste is enabled") : I18n.tr("Ctrl+Tab: Switch Tabs • Ctrl+S: Pin/Unpin • Shift+Enter: Paste • Shift+Del: Clear All • F10: Help • Esc: Close");
}
@@ -145,12 +145,6 @@ Item {
}
}
Process {
id: wtypeProcess
command: ["wtype", "-M", "ctrl", "-P", "v", "-p", "v", "-m", "ctrl"]
running: false
}
Process {
id: copyProcess
running: false
@@ -161,7 +155,7 @@ Item {
id: pasteTimer
interval: 200
repeat: false
onTriggered: wtypeProcess.running = true
onTriggered: ClipboardService.sendPasteKeystroke()
}
function pasteSelected() {
@@ -179,10 +173,6 @@ Item {
}
return;
}
if (!SessionService.wtypeAvailable) {
ToastService.showError(I18n.tr("wtype not available - install wtype for paste support"));
return;
}
const pluginId = selectedItem.pluginId;
if (!pluginId)