Discover how your system sees those keys, using the command xev
and pressing the keys whose id you want to discover.After entering the xev
just press page up and then press alt+t then you will get the following results. Then use the key code you got on pressing alt+t keys in the command at the end. that's all it will be done. I did this on my laptop and got the below results and so i gave it for reference only. You have to perform action to get your own result as these results vary with computer.
Pressing Up produces keycode 111, assigned to action Up
:
KeyPress event, serial 34, synthetic NO, window 0x3a00001,
root 0xa5, subw 0x0, time 13739005, (165,-16), root(170,32),
state 0x0, keycode 111 (keysym 0xff52, Up), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
Pressing Pg Up key gives the following:
KeyPress event, serial 32, synthetic NO, window 0x2400001,
root 0xc3, subw 0x0, time 13714833, (61,151), root:(63,236),
state 0x10, keycode 112 (keysym 0xff55, Prior), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
Once you know the keycode of the keys you would like to use, and the name of the actions you want to perform, you can assign the desired actions to the chosen keys.
The following four commands will produce the desired change, valid only for the present X session:
xmodmap -e "keycode 112 = Up"
To get these changes for every session, after issuing the commands above, create a file called .Xmodmap (or whatever), with the following command:
xmodmap -pke > .Xmodmap
Then, create a file called .xinitrc in your home directory, containing just the following line:
xmodmap .Xmodmap
Enjoy!
Refer to the site for any doubts: http://wiki.linuxquestions.org/wiki/...txkbmap_Method