How to make Arduino runs continuous routines even inside a "switch case loop".

AWOL:
Separate the "getting the thing to do" (entering the key code) from the "doing the thing".
A simple state machine (good search term there) will help.

Can you tell me how to do this?? If you would make an example with some code/pseudocode I'll really appreciate it!!Meanwhile I'll start to search something in this great forum!
Thank you very much for your soon reply!