demo: beforeKeyDown