Scripting about properties panel
bpy.ops.wm.context_set_enum(...)
Setting a value from a context path for a shortcut use one of the bpy.ops.wm.context_set... operators
&gt;&gt;&gt; bpy.ops.wm.context_set_
                           boolean(
                           enum(
                           float(
                           id(
                           int(
                           string(
                           value(

This one is an enum property (string would work too)
&gt;&gt;&gt; bpy.ops.wm.context_set_enum(
context_set_enum()
bpy.ops.wm.context_set_enum(data_path=&quot;&quot;, value=&quot;&quot;)
Set a context value

For the equivalent to
bpy.context.space_data.context = 'MODIFIERS'

using an operator will be,
bpy.ops.wm.context_set_enum(
        datapath=&quot;space_data.context&quot;,
        value='MODIFIERS',
        )

cannot test this in python console because it is not in the correct properties space context, instead add it manually to test, Edit &gt; Preferences &gt; Keymaps &gt; Properties Edit

...Ok numpad 5 now switches to modifiers tab.
To set up shortcut using python see
Create keyboard shortcut for an operator using python?*