NOT QUITE. The issue is that I3 and I4 present a higher impedance and the resistor would not drop the voltage significantly. The best scheme (described below generically for each input) is to pull up with a resistor to +5V and then allow the switch to pull down the input to GND when closed.
– Do not enable I3 and I4 for analog. They’ll default to digital
– Place a 10K resistor with one side to the +5V and the other side to the corresponding input (I3 or I4).
– Place the switch (dry contact) with one side to the corresponding input (I3 or I4) and the other side to GND.