Fortunately, Google helped me to find the solution again. There is a command called xmodmap to modify keymaps.
The steps are:
- Create a file, for example, ~/.Xmodmap
- Paste the following lines in the created file
- Run xmodmap to enable the settings
! No Caps Lock
! Caps Lock as Win key
add mod4 = Caps_Lock
$ xmodmap ~/.Xmodmap
After changing Caps Lock key to Windows key, wmii cannot move windows to desktop#2.