This goes with the last checkin - added locking around kbd-reset so it will work when the alarm handler is enabled.