If you have Ubuntu and vncserver, and you’re having problems with the keyboard when connecting from a Windows machine (i.e. the keys you press are not showing correctly in the VNC session), you can quickly solve  by adding the line
export XKL_XMODMAP_DISABLE=1
at the beginning of the $HOME/.vnc/xstartup file :)