Major rewrite to use neater keys definition and better break up the
hooks for easier maintenance. Ties in with newer .xinitrc used from wdm.