I recently bought a netbook which came with a good size keyboard. However, due to the space constraint, the netbook producer, turns out, combined the Page-up and Home, and Page-Down and End keys. Well, as a touch typist and a programmer, I often use Home and End keys, and it is certainly a pain to be able to access them only via a Function key like Fn+Page-up=Home. So I did some googling, and here is the result.
1. Install Xmodmap
in ubuntu do:
sudo apt-get install xmodmapin fedora do:
sudo yum install xmodmap2. get the "keysym" name of the keys using xev
keysym of "home" key is "Home"
xevpress the Home key
KeyRelease event, serial 33, synthetic NO, window 0x1800001,
root 0xaa, subw 0x0, time 3028114, (288,433), root:(289,515),
state 0x0, keycode 110 (
keysym 0xff50, Home), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
via xev: keysym of "Page up" key is "Prior"
xevpress the Page up key
KeyRelease event, serial 33, synthetic NO, window 0x1800001,
root 0xaa, subw 0x0, time 2825051, (322,253), root:(323,335),
state 0x0, keycode 112 (
keysym 0xff55, Prior), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
4. switch keys by doing two assignments
xmodmap -e "keysym Home = Prior" -e "keysym Prior = Home"