F1 is really annoying but sadly nothing of all these worked for me. I use ubuntu and still when I press F1 it brings up the GNOME terminal manual window!!! Any thoughts?
If it brings up Gnome help and not Vim help, it means your Gnome window manager snatches it before Vim has a chance to see it. The solution, if any, is somewhere in your Gnome (and/or WM and/or Compiz and/or ...) settings. — Tonymec 17:37, April 9, 2010 (UTC)
Ok Τonymec thank you very much. Finally what I did to fix it is the following. First of all with xev utility I found out that the keycode of F1 is 67. Then I issued the command xmodmap -e "keycode 67 = Escape". That was it. F1 behaves like Escape now
sudo pacman -S xorg-xmodmap xorg-xev xkeycaps
PS: XKeyCaps is a graphical front-end to xmodmap.
xev 查得f1的键盘码为 67
xmodmap -e "keycode 67 = Escape"
xmodmap -pke > ~/.Xmodmap
If you are using GDM, XDM or KDM, there is no need to source your ~/.Xmodmap manually as these display managers source that file if it is present, whereas startx does not. Therefore, to activate your custom table when starting Xorg, add the following:
if [ -s ~/.Xmodmap ]; then