Multiple actions/context states with a hotkey

This morning I was feeling frustrated by “Lock Camera to View” requiring so many presses to interact with and break free from. I set out to fix this, and mission accomplished, no problem. However, I really wanted to make a hotkey to simultaneously enter into the camera view (such as from ` + 1) when locking to view with wm.context_toggle space_data.lock_camera, to have a kind of ‘linked’ keybind state which would enter the view with the camera locked, and exit the view when unlocking it.

I would like to accomplish this without writing an add-on, which is conceivable being such a trivial thing; but today is not the day I would choose to dive into something new such as blender scripting. I understand that what I’m asking might not be possible within the current framework, but you learn something new everyday I suppose.

Thanks for any help/tips

Not sure about the specific problem with the camera view, there might be setting hidden somewhere. But for the general case, no you can’t trigger multiple actions with one keypress. That’s actually exactly a kind of case where an addon does the trick.