Create Shortcuts to Toggle Actions? I know you can create and edit shortcuts in User Preferences > Input, but I can't figure out how to make a shortcut to toggle something on/off.

For example, I can right click on the Shade Smooth button on the Tool Shelf,
(N in the 3D view)
and select "Create Shortcut" but I only can get one shortcut to shade smooth or shade flat, not one or the other based on what the current shading setting is.

So my question is,
is it possible to create a shortcut to toggle a setting?
That really depends on how the value is stored internally.

Blender already have operator for toggling Boolean values, like bpy.ops.wm.context_toggle. This operator alone is applicable to modify lots of properties, like active 3D view space's Only Render (space_data.show_only_render) or scene's Simplify (scene.render.use_simplify).

Some other settings may look like binary values of some property, but in fact not. Face shading is actually only accessible as two operators: faces_shade_flat and faces_shade_smooth. To toggle between both states, you'd have to write a new operator that toggles which of the two operators to execute based on another property, like a custom BoolProperty inserted to a Mesh object.