Xmodmap only works for X11 applications, the ones you've listed for sure are not X11 applications. Most likely you don't use any X11 at all. To remap keys on macOS see the answer on https://apple.stackexchange.com/questions/256152/karabiner-quit-working-in-sierra-how-do-i-map-my-menu-application-key-to-be-com?noredirect=1&lq=1 instead.