###1. Examine Default Mapping
terminal
xmodmap -pke
###2. Write Code
script
# clear meta key mappings
clear shift
clear control
clear mod1
# swap key mappings
keycode 50 = Alt_L NoSymbol Alt_L
keycode 62 = Control_R NoSymbol Control_R
keycode 64 = Shift_L Meta_L Shift_L Meta_L
keycode 77 = KP_Delete KP_Delete KP_Delete KP_Delete
keycode 119 = Hiragana Hiragana Hiragana
# activate new meta key mappings
add control = Control_L Control_R
add mod1 = Alt_L Alt_R
add shift = Shift_L
###3. Run
terminal
xmodmap script