wm.context_toggle for Toggle On / Off X-RAY Armature ( Context attribute )
Set your custom keyboard shortcut like this:



Key points


When setting toggle shortcuts use wm.context_toggle
When it pertains to the active object use active_object. followed by the last part of your context attribute name, which in this case is show_x_ray
If you add this to the list under the Object Mode section the shortcut will only trigger X-ray display while you are in Object Mode, which frees up your keyboard shortcut to be used for something else in Edit Mode, etc. If you add it under 3D View (Global) the keyboard shortcut will trigger it in all 3D View modes.