Electronic keys comprising a mechanical key within their housing