Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-24-2005, 11:24 PM   #1
Registered: Jul 2005
Distribution: Debian Etch
Posts: 48

Rep: Reputation: 17
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 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.
Old 12-26-2005, 10:19 AM   #2
Registered: Apr 2005
Location: Jordan
Distribution: Debian (Sarge), Ubuntu (6.06)
Posts: 271

Rep: Reputation: 31
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,
I'm sorry to say that if the CPU is under high load it won't catch the keyboard IRQ in time for this to be semi-instant.... i'm afraid there's no solution to this one.....

Except perhaps the power button on your monitor...
Old 12-26-2005, 04:09 PM   #3
Registered: Jul 2005
Distribution: Debian Etch
Posts: 48

Original Poster
Rep: Reputation: 17
The previous way, with KDE bringing the window up, was fast enough for me. It's just that the screensaver takes too long to launch.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressing 'alt 1' key twantrd Linux - General 2 01-07-2005 12:05 AM
Blank screen even before BIOS screen on boot josce Linux - Laptop and Netbook 3 01-04-2005 08:27 AM
Keyboard issues, pressing and holding key sometimes doesn't have ordinary effect... ateam Slackware 6 11-02-2004 02:52 AM
kde start menu/kmenu position when pressing windows key mickyg Linux - Software 0 10-29-2004 04:42 PM
I did the following program and get blank line after pressing <ENTER> purpleburple Programming 5 08-21-2002 12:00 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration