Once again I'm not really I coder myself, so I don't know a definite answer for this.
I think I figured it out by trial and error myself, I looked up how other key maps were pre-configured by default, tested a few things and tried until it worked.
Googling for the operators is often useful too.
You can also look in Blender Info Editor (by default the header with the File, Render, Window and Help menus) if you expand the editor you will find above the menus is a message history. There and in the Online Python Manual you can find that it is a Boolean Property, and it toggles between
FALSE. Most other toggles that work like this are also probably Boolean Properties, for which you must toggle with the
Some others are actually Enums (enumeration of several possible predefined values) like for example the current 3D View Shading mode, and for those you use the operator
wm.context_toggle_enum instead. You can also learn this by inspecting other existing default keymaps.