Hello Tonny,
I think you want to add some new state like 'armed'. This means, when the user presses 'Enter', the state 'armed' changes and the component appears yellow or red.
Nevertheless, the state machine is not clear to me, so I would not be able to implement that. But anyhow, you have the key handlers and the touch handlers. Depending on the user interaction, you can define the current state of your component (e.g. selected, enabled, dragging and for example the new state armed).
Within UpdateViewState you can colorize your component according the current component state.
The overall question (which I cannot answer) is: How does the component behave in case of keyboard inputs and in case of touch inputs and what state changes are allowed or not allowed.
Best regards,
Manfred.