We have to presume the top rail is ground and the lower is Vcc.
The secret is the micro can, within a few instructions, set the pin as an input instead of an output, and determine whether the switches are closed. You would need weak pullups at the micro to sense the 1K being grounded by the switches.
ie. if the micro's pull up was 10k the resultant voltage could be a marginal logic 0. If the pull up was larger, the voltage would be lower and a more reliable 0 could be ensured.
Actually on second thoughts it is not that easy, the LED is still in circuit, and will contribute as a pull up too, albeit the drop across the LED will set a lower source voltage.
You would have to check the input levels for a valid logic zero to see if your logic zero would be reliable.
If LED is ostensibly on, the brief moment the micro pin becomes an input would be unobservable to the human eye.
Won't the LED light when a switch is held on?
NO, if the micro is sending a logic high out for the LED off state, the LED will remain off as the 1K will not be strong enough to overcome / drag the LED's cathode low enough.
This is actually common practice for front panel displays sharing a pin's function in such a way, and especially handy if the micro's pins are in short supply, but you have to be careful with the logic zero levels coming back to the micro.