Second question first. The
Robot Controller Reference is your friend. Check page 9.
First question. This should be working. So I have a few questions for you. Are you certain you're properly setting it to an input? Are you sure you're not setting it to an output somewhere just after that? Are you sure you're not sending a value to the variable in you code anyways? And finally, are you sure the PWM is plugged in the right way and in the right port?
Otherwise, yes shorting black to white should change the input from 1 to 0. The input is 1 normally because the the pin has a pull up resistor on it that pulls the value up to 5V when there's nothing connected.