Using incorrectly input pins?

I discovered that when an input pin has a cable and nothing else attached to it, the read value is either HIGH or LOW, randomly. I want to register a closing circuit: output HIGH in one pin, onto a circuit board from a keyboard, and then into the input pin. Is buying pull-down resistors the only way of doing it? Can I make it work with the included pull-up resistor? (HIGH set on input) Thank you :)

Arduino has a software-configurable mode for internal pullup ..... take a look here...

....click here....

In short pinMode (pin, INPUT_PULLUP);

discovered that when an input pin has a cable and nothing else attached to it, the read value is either HIGH or LOW, randomly.

You are not the first to discover this, read http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

That was really helpful, thanks!