Worked around a bug on older OS X versions that causes the hook to drop after a period of inactivity.
Fixed demo hook to stop on escape.