I believe first part of detecting character is already done with bitmasking, and the change notification that updates the scanKeypad variable in the main is already included.