Create a notebook window:
Set
NotebookEventActions so that the notebook will change color when clicked:
Clicking the notebook changes its background:
Make an action occur when the
Enter key is pressed:
The background will be pink only while the mouse button is held down:
After the mouse is released, the notebook is back to its normal background: