keyboard shortcuts doesn't work on 'screen sharing'
In short, you need to set it to something that won't be interpreted at the local machine first.

This same thing happens for such as the key to invoke Mission Control - if the key command is the same on both machines, the local one responds instead of the remote.

The only solution I've found is to change the local key command to something different, or to have to go the 'long way round' each time.