Use state machine in controller

The process event mechanism uses a state machine to allow different
behviour ok key presses during the game. For example, when pressing
'o' to open a door, the game waits for a directionnal key to be
pressed to determine which door to open.

Should still allow to auto-detect if only one door adjacent and
skip the directionnal key selection.