How can I block spike traps on the PC?

I'm at a point in the game where I'm stuck. I keep getting killed by a spike trap.

The game game me some information earlier on how to block it, but the information doesn't come again. I might have read it wrong. If I remember correctly, we're supposed to wait for the color to change, then hit the button corresponding to the color.

The spike trap flashes yellow, so I believe I'm supposed to press the right mouse button (shield action).

I tried waiting for the color to change to yellow and then hitting the button. I still got killed.

I tried spamming the right mouse button the moment the spike trap starts moving (before it turns yellow) right until it hits me. I still got killed.

I tried pressing and holding the right mouse button. I still got killed.

How do I overcome this spike trap? I died 30 times to it already, so I find it hard to believe its just bad timing on my part.


Watching some let's play videos of the game, the instructions for traps says

{Button} to Deflect. To defeat traps, time your deflection to occur in the colored timing window, similar to executions.

The manual states that the default button for deflection is space when playing with keyboard and mouse.