I wrote a position-swap script similar to the behavior introduced in Design Space for Photoshop CC 2015.
The script has two versions that differ by positioning logic.
swapPosition.jsx swaps position relative to each layer's top-left corner (same principle as newer Photoshop versions). It works especially well when layers have equal width.
swapPosition-mirror.jsx positions relative to opposite edges. Use this one when you need to swap neighboring elements of different width.
I tried to illustrate the difference in this video.
You can run the script via File > Scripts > Browse.
Or copy it into the scripts folder:
- on Windows: C:\Program Files\Adobe\Adobe Photoshop\Presets\Scripts\
- on macOS: /Applications/Adobe Photoshop/Presets/Scripts/
Then it will appear in File > Scripts, and you can assign a shortcut via Edit > Keyboard Shortcuts.