Added sleep hook for restoring keyboard setting when coming back from sleep