Skip to content

Fusion Network

Fix prt sc button on HP TM2 on LInux

I am running Fedora linux 10 on an HP TouchSmart TM2 laptop. Most things work well such as the touchscreen and the screen rotate but the print screen (screenshot) button was not working properly. Here is how I fixed it.

 You must install the following package.

  • xbindkeys

 Go to  your users home directory.

If there is not already a file called .xbindkeysrc create it.

touch /home/youruser/.xbindkeysrc

 Make sure the following is in the file. 

 # Fix the Print Screen key on HP tm2

"gnome-screenshot"

    m:0x0 + c:118

     Insert

 Save and close the file. 

 Test it by running the following in a command line. 

xbindkeys -v -f /home/youruser/.xbindkeysrc

This press the "FN + Insert/prn sc" key on your TM2 and you should see the print screen/screenshot dialog pop up as it should. 

To make sure that this is already running for us on boot we add this into our gnome session properties. 

From a command line run the following (as your logged in user).

  • gnome-session-properties
  • Click the "Add" button to the right. 
  • For name you can say "Fix Print Screen" or whatever you would like. 
  • For command put the following (make sure to change it for yourself!: /usr/bin/xbindkeys -f /home/youruser/.xbindkeysrc
  • Click ok/save and close gnome-session-properties. When you reboot xbindkeys will run on its own and will fix your screenshot key!

Bonus Info:

 I found the entry to put into the .xbindkeysrc file by running the following command on the HP tm2 laptop. 

"xbindkeys -mk"

You then hit the keys you would like to use for whatever command you would like to run. It should return something similar to what I gave you above. 

xbindkeys is a very powerful tool and can be used to setup your media keys (play/pause/etc) to control media players or to run other commands or scripts on your system.