I found this commentthis comment in an Askubuntu Q&A titled: keybinding issues with xmodmap across synergykeybinding issues with xmodmap across synergy.
Excerpt
Do you run into the same problem if you use Xkb to swap control/capslock? You should be able to do this through the keyboard control panel application, or with setxkbmap. xmodmap has been known to screw things up for xkb aware applications. – James Henstridge Nov 17 '11 at 1:16
Perhaps you should try using setxbmap instead of xmodmap?
I found this nice tutorial to get you started with setxbmap titled: Extending the X keyboard map with xkb, if you're interested.
I tried to find a list of what applications are XKB Aware but was unsuccessful. I did come across this document titled: The X Keyboard Extension. In this document there is mention of 3 classifications of applications, in case you're interested.