you probably have Interrupt on PORTB change just check the PORTB.4 status in the interrput handler and you should be in business.

Just be careful when you program your PIC.. disable MCLR to make it RB4