I forgot my key in the room.

Literal

Room [in-に] key [object-を] forgot.

忘れる here means 'to leave behind' rather than 'to forget from memory.'