Is it possible to assign a keyboard shortcut for toggling a preference?
As sambler points out, my answer is overkill for your purposes. However the general question deserves an answer too: How to assign a toggle shortcut to a preference.

Make a new keyboard shortcut or re-appropriate a shortcut you don't use.

UserPreferences -> Input -> Window



If you add a wm.context_toggle and hit enter you'll get another field called "Context Attributes". It might appear that you can't type into that field but you can. Paste into it:   

user_preferences.view.show_tooltips
# or
user_preferences.view.show_tooltips_python


depending on what you need.