It not to hard to do with screen state carry over, then you could have them in your inventory.
He's the the I have done it in the past: Have a chest that when you open it it takes you to another screen that looks the same. In the new screen have some kind of way of triggering the secrets on the screen. This screen will then have a screen state carry over that will then allow you to open the key block. (this screen will also give the player the item to make them think that the item does something)
The screen that you need the key will work like this: There will be a secret tile that can only be triggered by a screen state carry over from the other screen. If you enter where that secret tile is it will then put in the key and do whatever you wanted to do.
This isn't the easiest, so if it doesn't work first try don't be discouraged. When I do this type of thing I don't think I have been able to get it to work the way I wanted it to first try ever.
EDIt: You would have to first take you to a screen that checks if you have the key, otherwise you would be able to go to the same cutscene of the key thing over and over again.
Edited by TheRock, 09 June 2017 - 11:44 PM.