Bug 474024 - Binding META (only) to any widget
Summary: Binding META (only) to any widget
Status: RESOLVED DUPLICATE of bug 464805
Alias: None
Product: lattedock
Classification: Unmaintained
Component: application (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-01 14:33 UTC by tietininon
Modified: 2024-08-01 20:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tietininon 2023-09-01 14:33:48 UTC
SUMMARY
This is possible with the Plasma integrated dock but not with Latte.

Procedure with the default dock:
TLDR:
1. Move any widget to any existing Panel
2. run `qdbus org.kde.kglobalaccel /component/plasmashell | grep -i shortcut` to determine the namespace of `InvokeShortcut`
3. run `grep -i -B5 {widget_name_we_want_to_bind_meta_to} ~/.config/plasma-org.kde.plasma.desktop-appletsrc` to find out the widgets ID
4. run `kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta "org.kde.kglobalaccel,/component/plasmashell,org.kde.kglobalaccel.Component,invokeShortcut,activate widget {widget_id_from_3}" followed by `qdbus org.kde.KWin /KWin reconfigure`


STEPS TO REPRODUCE
1. Try to bind  e.g. "Activate Entry 1" to meta only

OBSERVED RESULT
You cannot apply the changes

EXPECTED RESULT
I can apply the changes

SOFTWARE/OS VERSIONS
KDE Plasma Version:  5.27.7
KDE Frameworks Version:  5.109.0
Qt Version:  5.15.10

In Latte it looks like this:
Listing the available methods via qdbus delivers:
```
>>> qdbus org.kde.lattedock /Latte
method void org.kde.LatteDock.activateLauncherMenu()
method void org.kde.LatteDock.addView(uint containmentId, QString templateId)
method QStringList org.kde.LatteDock.contextMenuData(uint containmentId)
method void org.kde.LatteDock.duplicateView(uint containmentId)
method void org.kde.LatteDock.exportViewTemplate(uint containmentId)
method void org.kde.LatteDock.importLayoutFile(QString filepath, QString suggestedLayoutName)
method void org.kde.LatteDock.moveViewToLayout(uint containmentId, QString layoutName)
method void org.kde.LatteDock.quitApplication()
method void org.kde.LatteDock.removeView(uint containmentId)
method void org.kde.LatteDock.setAutostart(bool enabled)
method void org.kde.LatteDock.setBackgroundFromBroadcast(QString activity, QString screenName, QString filename)
method void org.kde.LatteDock.setBroadcastedBackgroundsEnabled(QString activity, QString screenName, bool enabled)
method void org.kde.LatteDock.showSettingsWindow(int page)
method void org.kde.LatteDock.switchToLayout(QString layout)
method void org.kde.LatteDock.toggleHiddenState(QString layoutName, QString viewName, QString screenName, int screenEdge)
method void org.kde.LatteDock.updateDockItemBadge(QString identifier, QString value)
method QStringList org.kde.LatteDock.viewTemplatesData()
method void org.kde.LatteDock.windowColorScheme(QString windowIdAndScheme)
signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString interface_name, QVariantMap changed_properties, QStringList invalidated_properties)
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
method QString org.freedesktop.DBus.Peer.GetMachineId()
method void org.freedesktop.DBus.Peer.Ping()
```
`activateLauncherMenu` seems to be there and claims to be activateable either via checking the option in the configuration "Prress Meta to activate Application Launcher" or alternatively by issuing the following command:
`kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta "org.kde.lattedock,/Latte,org.kde.LatteDock,activateLauncherMenu"`.

Both do not seem to work. What does work on the plasma integrated Panel is the procedure described at https://zren.github.io/2019/03/04/activate-any-widget-with-meta-key.
Comment 1 tietininon 2023-09-01 14:36:34 UTC
One addition:
We have to define the ALT + F1 shortcut to the widget we want to launch via META for it to work.
Comment 2 tietininon 2023-09-01 14:37:34 UTC
e.g. via System -> Shortcuts
Comment 3 fanzhuyifan 2024-08-01 20:20:20 UTC
Fixed as of plasma 6.1

*** This bug has been marked as a duplicate of bug 464805 ***