The default UI lacks a convenient way to set this, but you can modify the following dconf
setting:
dconf read /org/gnome/desktop/input-sources/xkb-options
dconf write /org/gnome/desktop/input-sources/xkb-options "['compose:menu', 'caps:escape']"
See the xkeyboard-config man page for more options.