This is for an ISO UK layout:
USB ID (from lsusb): Bus 020 Device 012: ID 04d9:0141 Holtek Semiconductor, Inc. USB Keyboard
Set keyboard layout
- Go to System Preferences -> Keyboard -> Input Sources
- Set layout to British -> PC
Reverse modifier keys
- Go to System Preferences -> Keyboard
- Click 'Modifier Keys'
- Change Option to Cmd and Cmd to Option
- Fn + W = Play/Pause
- Fn + S = Vol Down
- Fn + D = Vol Up
- Fn + Q = Previous
- Fn + E = Next
- Put it in programming mode with Fn + RCtrl.
- Press the key you want to bind the macro to.
- Type in the sequence you want saved, push Pn when done.
- Exit programming mode, again with Fn + RCtrl, or continue binding macros to other buttons if you wish.
- Use the macro by pushing Pn + the bound key.
L_Win + R_Alt + Spacebar = R_Shift, FN, PN and R_Ctrl as arrow keys.