Blank the screen on pressing key: possible?
Would it be possible, say, to set something up that if I pressed a specific key on my keyboard, say the Context Menu key which I don't use for anything else (it's keycode 117 with xev), that the screen would instantly turn black? or some other colour? or perhaps display an image of my desktop? or my real desktop?
I use Debian Etch, KDE 3.4, a Pentium 4 PC, and x.org 6.8.3; you have that to work with. Open to installing new applications.
I can successfully bind the key to a command using khotkeys; I just can't figure out a relevant command. I managed to do this previously (in KDE 3.3) by creating a .jpeg screenshot of my blank desktop, and opening it with imagemagick in the background, skipping the taskbar, whenever KDE launched. Then I used KHotKeys to bind the context key to bring the imagemagick window to the top and set the KDE Panel size to 0 using DCOP.
Unfortunately this doesn't work now that I upgraded to KDE 3.4 because the panel no longer resizes to 0 using DCOP; the minimum size is 16 pixels.
The way I have it now, I've defined my screensaver as a black screen and the context button simply starts the screensaver, but the problem is this is often slow to start, especially when the CPU is under heavy load, and I need the hiding to be instant, or as instant as possible. I can't seem to superimpose a window overtop of the panel, which is why I can't simply make the imagemagick window fullscreen; I need to hide everything, including the applications in the taskbar. Unfortunately (and very surprisingly) there is no DCOP function to simply hide the panel, kicker.
Anyway, suggestions are welcome. And no, I'm not running some illegal viagra business from Mexico, I'm just paranoid. Thank you.