Added the pullup resistors (now that I know what they are), and yeah it seems to be working better now. Now that I also know what switch bounce is, I'm much more glad I don't need to worry about it in this case.
So, the next challenge in this project is to convert the 5V logic signal into something strong enough to trigger a 12V relay. Apparently this in some way involves a transistor, so that's the next port of call for the brain strain known as "learning stuff". Any pointers on where to start with transistor usage would be much appreciated!
BTW, another thing I'm still majorly ignorant of is power supplies. Thus far I've basically had it easy using an adjustable DC power supply I built as a kit for a uni subject. It is very handy but it means I still don't really have a clue how I might take say, a 24V supply and get for example 5 and 15V circuits out of it?