Gates and keys