How to bind a series of commands to a custom hotkey (scripted macro)?
If you just want to apply a subsurface modifier you can just press CTRL+2..., where the number (2 in this case) is the number of subdivisions you see in the viewport.
If not, i always prefer AutoHotkey (https://www.autohotkey.com/) to bind keystroke sequences to a custom hotkey, it's very easy to program and you can turn it off insantly...