Two Pushbuttons on One Input for More I/O

But how can you see the diference between the high from the pull-up and the high from the button?

Do digitalWrite(buttons, LOW) to disable the pull-up, read the input, then digitalWrite(buttons, HIGH) to enable the pull-up and read again. The input will follow the written values only if neither button is pressed.