I got a problem when I was using vncviewer: couldn't type d in the terminal or other windows.
The solution is:
1. Go to System->Preference->Keyboard shortcuts
2. Find the item Hide all normal windows and set focus to the desktop
3. Type Alt+D to change this hot key
4. vncserver -kill :1 which kills the current server
5. restart the vncviewer.