is there a way to setup a KDE panel so it autohides (or is completely hidden), but is shown as soon as a modifier key (super) is pressed (on key-down, not on key-up), and (less important) hides again as soon as it’s released (like sway-bar with `mode hide` set)?
Setting the panel to autohide, and the custom shortcut for “Move keyboard focus between panels” to “Meta” is almost what I want: that toggles the panel when the super key is *released* - I want it to show when it’s *pressed* (and ideally hide when it’s released, but that’s less important to me).
I guess it’s not possible to set this up using the regular keyboard shortcut settings, but maybe someone has scripted something like this or any ideas how to go about that…?
I noticed the “Focus shortcut” set on Panel settings triggers on KeyDown, but it doesn’t allow me to use just “Meta” as shortcut, but only a key combination.
However that seems to be a dead-end, because if I edit ~/.config/plasma-org.kde.plasma.desktop-appletsrc manually, to set the shortcut to just “Meta”, it kinda works - but it’s only triggering on KeyUp again.
I solved my problem by creating a plugin for KWin:
It’s just a few lines of C++, registering as an InputEventSpy and handling the keyboardEvent callback. The action I take is hard coded, sending a DBus message to PlasmaShell to show or hide the panel.