How to remap Mac keyboard with Xmodmap
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 Karabiner quit working in Sierra. How do I map my menu/application key to be Command? instead.
Another app commonly used to remap MacOS keys is Ukelele.