I'm also fairly new to game development myself so this might now be the best advice but maybe you could set a variable called "interacting_with_dummy" (or something like that). Set it to false at the top of your code then when you initiate the function to interact with the dummy, set it to true. Then you can do an if statement saying if interacting_with_dummy == true:
(I'm not exactly sure how you'd disable the WASD keys but that code would go here)