Recovering from stuck modifier keys caused by VMWare

I use VMware a lot, mostly using VMware Workstation 6.0.2 under Linux host. However, from to time, some or all of the modifier keys (Ctrl, Shift, and Alt) somehow ceased to function. Seemed that sometime VMware failed to correctly restore those keys function to X server.

Here's simple command, using xmodmap (installed as part of X base utilities) that will fix this issue. xmodmap is assumed to be located at /usr/bin

/usr/bin/xmodmap - << fixme
clear shift
add shift = Shift_L Shift_R
clear lock
add lock = Caps_Lock
clear control
add control = Control_L Control_R
clear mod1
add mod1 = Alt_L Alt_R
clear mod2
add mod2 = Num_Lock
clear mod3
clear mod4
add mod4 = Super_L Super_R
clear mod5
add mod5 = Scroll_Lock
xset r on
xset m 3.5 4
xset b off
xset s off

Open your favorite terminal application and paste the whole command sequence.  The keys should function back as normal afterwards.