I use autokey not as a hotkey but as text expansion. If I type "..c" then this is expanded into "{}" with the cursor inside the braces. And to surround text with "{}" I use ",,c", hence "whatever,,c" becomes "{whatever}". I have similar text expansion for other symbols that require AltGr, square braces are ..s and ,,s for instance. On Windows Autohotkey can do the same, just the scripting language is different. The Autokey text for curly braces is simply "{}<left>" and for surrounding with curly braces the script is:
import time
keyboard.send_keys("<shift>+<ctrl>+<left>")
time.sleep(0.25)
sample = clipboard.get_selection()
keyboard.send_key("<delete>")
keyboard.send_keys("{%s}" % sample)
Maybe it helps you.