Yes, but all you really need is one series resistor and the two diodes, the other components won't stop it working but they probably are not needed. Also note that if your MCU needs to respond quickly to a change in input, the capacitor has to charge/discharge first through the resistors so it will delay the signal a little.
If you really need a capacitor, for example in a very noisy environment, drop its value and increase the resistor value so you get the same filtering effect and also get better protection against input over-voltage. For example, change 1K to 10K and 10nF to 1nF. If you need the pull-up resistor R2, make it much higher in value, maybe 47K or 56K so you can still pull the MCU input low enough when the input is grounded.
Brian.