Thank you CrossRoads
So if I understand your solution is a software based pull-up or maybe use a resistor that exists inside the micro controller.
If i step back to my first question, in a closed button situation (regardless to the floating situation of an opened button) if we remove the 10k-ohm resistor and rather connect the wire to the ground, would it send "high" to the pin 2 or would it just shorcut the power to the ground?