Using Ubuntu Linux on MacBook Pro, to use both Command+Tab and Option/Alt+Tab to switch windows the following .Xmodmap file can be loaded at startup.  It swaps the left Super_L [command] key with the seldom used right Alt_R [option/alt] key:

clear mod1
clear mod4
keycode 133 = Alt_R Meta_R Alt_R Meta_R
keycode 108 = Super_L NoSymbol Super_L
add mod1 = Alt_L Alt_R Meta_L
add mod4 = Super_L Super_R Super_L Hyper_L

Changing the keycodes will change the modifiers (mod1, mod4), so the mod lines are requried to restore the modifier key behaviours. Also be sure to add the multiple keycode keysyms as above otherwise functionality like Ctrl+Alt+F1 may stop working.

23 Aug 2016 / admin