[powerdebug 06/14] encapsulate the keystroke callback