add mod_switchpi, and add switch hook code to keypad test program