For each machine running xmodmap
will give you the mapping and keycode, take a look first then write the script. I use ubuntu and mac keyboard. The below maps both left and right control and super.
Create an .Xmodmap file in your Linux home directory, with the following contents, then execute xmodmap .Xmodmap
clear control
clear mod4
keycode 37 = Super_L
keycode 105 = Super_R
keycode 133 = Control_L
keycode 134 = Control_R
add control = Control_L
add control = Control_R
add mod4 = Super_L
add mod4 = Super_R
This may work generally, but for the terminal apps it won't remap or give you copy and paste without additional work. You can take a look at my project for something that will remap itself any time a terminal app takes the focus. (can be extended to do more, but I haven't seen much need for that) https://github.com/rbreaves/kinto