In breif, this config lets me use the escape key to bring up the ZX Spectrum Next menu when running under CSpect on the mac.
The escape key will send: F10, shift+1, F10.
Using any modifier key and escape will exit CSpect (sending a real esc key to CSpect).
This config is used with Karabiner-Elements