Trying to register an application-specific keyboard shortcut: is is possible?

Hello! I’d like to run a script whenever the ESC button is pressed when using Yakuake. I wrote a program that toggles its visibility under wayland, so I’m able to toggle it with the global shortcut F12, but I’d like to be able to hide it by pressing ESC. Naturally I don’t want to register ESC as a global shortcut, as it would conflict with many other applications: I’d like to just register a local shortcut, that is only triggered when using that specific application. Is it possible without rebuilding yakuake from source?

thanks in advance!

1 Like

Hia @tubbadu !

I don’t know if it’ll work under wayland but you definitely can configure “local” shortcuts for yakuake:


It actually works! (under X11)

I won’t keep it cause I use ESC a lot for other software (mc, vim) but you should give it a try.

thanks for the answer! I used to use this shortcut a lot under X11, but now I switched to wayland and this do not work anymore, so I’d like to “manually” minimize it with a command. To do this however I’d have to catch the keyboard shortcut in order to run my custom command

When I assign Esc to Open/Retract Yakuake and press Esc then Yakuake closes for me on Wayland

even if you set it to “pinned”? I’d like it to stay visible even if it looses focus, but I’d like to hide it by pressing ESC