Go to Windows->Settings/Preferences->Hotkeys... and under the Catagories section scroll down to "user" and select it. Now click on the New button on the right side of the window and the greyed out boxs become while.
name the command xray or what every you want. Paste this in the command window:
string $currentPanel = getPanel -underPointer
;
if(modelEditor -q -xray $currentPanel
!=0)modelEditor -e -xray 0 $currentPanel ;
else modelEditor -e -xray 1 $currentPanel ;
And assign the hotkeys that you want.
There might be a better way but this works for me.
good luck,
ww