There is a sentence in my book
It was me that raised the alarm
I am completely confused with this construction. "I" is used with it but here "me" is placed.
Second confusion is "who" is used for living things but here "that" is used.
Is it grammatically correct? If yes please explain to me.