USBKeyboard.h occasionally hangs

How is the input pin configured? Can you show your setup function?