Google Answers Logo
View Question
 
Q: Linux Keymapping ( Answered 5 out of 5 stars,   2 Comments )
Question  
Subject: Linux Keymapping
Category: Computers > Operating Systems
Asked by: bgannon-ga
List Price: $25.00
Posted: 18 Sep 2004 00:39 PDT
Expires: 18 Oct 2004 00:39 PDT
Question ID: 402817
I want to remove the 'Print screen' button from my US English keymap.
It's a long story, but that key is malfunctioning and repeating at
random times.  (laptop.. can't get new keyboard at this time).

How can I remove that key from the keymap?

Clarification of Question by bgannon-ga on 18 Sep 2004 00:40 PDT
Running Gentoo.. but any distro answer will work

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

Clarification of Question by bgannon-ga on 18 Sep 2004 08:48 PDT
put something in the answer so i can give the $ :)

thanks :)
Answer  
Subject: Re: Linux Keymapping
Answered By: leapinglizard-ga on 18 Sep 2004 08:58 PDT
Rated:5 out of 5 stars
 
Dear bgannon,

I'm glad I could be of service in this matter.

Regards,

leapinglizard
bgannon-ga rated this answer:5 out of 5 stars and gave an additional tip of: $10.00
wow.... amazing.. looked everywhere for this answer.... within 12 hrs,
3 months of pain is gone..

Comments  
Subject: Re: Linux Keymapping
From: leapinglizard-ga on 18 Sep 2004 11:42 PDT
 
Thanks for the tip, and keep on rocking with Linux!

leapinglizard
Subject: Re: Linux Keymapping
From: bgannon-ga on 18 Sep 2004 14:26 PDT
 
Been using Linux since '95
I haven't used a windows desktop on a computer i've owned since '96
i'm a UNIX admin for the military in Kuwait right now (along with wan
admin ... and a few other roles)..

I think I got too much sand in my laptop.. ;)

thanks for your help

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy