Adding hotkeys to call python script to engine

I have a Python script written which I’m hoping to use to add some functionality to Animation Mode, but I’ve hit a roadblock where I’m unsure how to add new key bindings to call the script.

Specifically, I would like to add hotkeys when the viewport is focused, and animation mode is active (or a level sequence is open), and in an ideal world, users could change those hotkeys locally in their editor. It was suggested I turn my script into a plugin (I would guess perhaps a simple blueprint library that just has an ‘execute python’ node in it), but the key binding aspect is still eluding me

Any suggestions would be much appreciated!


Any success with this quest?