Request for Question Clarification by
leapinglizard-ga
on
18 Sep 2004 06:01 PDT
Dear bgannon,
I'm tentatively posting a pair of solutions here. If neither one
works, let me know so that I can pursue further lines of inquiry.
Otherwise, I'll post this information as an answer later today.
The easiest way to prevent the "Print Screen" button from triggering a
screenshot application is to change the event association in your
window manager. I'm running Gnome on Red Hat 9, so from the taskbar I
select
Start -> Preferences -> Keyboard Shortcuts
to edit the key associated with the screenshot application. By
changing this to "Scroll Lock" or some other key I never use, I have
effectively disabled the "Print Screen" key, since the window manager
no longer uses it to trigger a screenshot.
The deeper, scarier way to disable Print Screen is to change the
mapping from the physical key to the symbolic key. Such mappings are
governed by X, the graphical server that underlies window managers
such as Gnome and KDE. They can be modified with the xmodmap command.
The first step along this perilous road is to find out the physical
key identifier, known as the keycode, for your Print Screen button. To
do this, execute
xmodmap -pk | grep Print
from the command line.
I get the result
111 0xff61 (Print) 0xff15 (Sys_Req)
Which tells me that the keycode is 111. Print and Sys_Req are symbolic
keys, or keysyms, to which this keycode is mapped.
Now, to bring about a state of affairs where keycode 111 is mapped to
an innocuous keysym such as, oh, let's say Scroll_Lock, I execute
xmodmap -e "keycode 111 = Scroll_Lock Sys_Req"
and verify that the mapping has changed by running
xmodmap -pk | grep 111
which shows the following.
111 0xff14 (Scroll_Lock) 0xff15 (Sys_Req)
Now, the keysym Scroll_Lock is issued each time someone or something
activates the Print Screen key.
To execute the line
xmodmap -e "keycode 111 = Scroll_Lock Sys_Req"
every time you start an X session, you can insert it into the
.xsession script in your home directory.
Please report back to me if neither of these methods is helpful to you.
Regards,
leapinglizard