[powerdebug V2: 06/14] encapsulate the keystroke callback