Disable some input controls in Lyra

I am adding the ability to swim and I only want forward movement when using the keyboard (WASD).

How do I achieve this in a Lyra project?