Make key consume input from input action

I hope I phrased that correctly. I’m working with WASD movement controls, and I would like to make it so that only one key is accepted at a time. So if a player is moving forward with W, but then moves right with D, the input action will ignore input from W until D is released. Is there a way to do that with input action contexts?