[Hampshire] keyboard keys being wrong.

Top Page

Reply to this message
Author: James Courtier-Dutton
Date:  
To: Hampshire LUG Discussion List
Subject: [Hampshire] keyboard keys being wrong.
Hi,

I have a MS USB keyboard, that when used with Linux gets all the
"UP/DOWN/LEFT/RIGHT etc" keys wrong.
For example, Pressing "UP" causes it to "Print screen" !!!!

I have found out how to correct this.
xmodmap -e "keycode 98 = Up"
xmodmap -e "keycode 104 = Down"
xmodmap -e "keycode 102 = Right"
xmodmap -e "keycode 100 = Left"
xmodmap -e "keycode 107 = Delete"
xmodmap -e "keycode 103 = End"
xmodmap -e "keycode 105 = Next"
xmodmap -e "keycode 99 = Prior"
xmodmap -e "keycode 97 = Home"
xmodmap -e "keycode 106 = Insert"

But, I connect remotely from different sources, so I only want this
map to be applied if I am attaching remotely via the free nxserver,
windows nxclient.

At the moment, the first thing I do when connecting from nxclient is
to put these commands in a script and run it manually before I do
anything else.
Is there any way to script this so that it can somehow recognize the
remote nx session, and only do the mapping for that.

Kind Regards

James