How to lock specific keys with another key?

maybe there is an elegant way to do that. but this works too :smiley:

I want to lock my character’s left/right movement while sprinting. And easiest way i think to do this is by disabling A and D keys while left shift is pressed and when the left shift released i want this keys to work normally. How can i make this in blueprint ?

yeah branch worked thanks