Oh, I'm an idiot. If you right-click on the "All" tab below the chat box there's an option there to "Toggle Always-On Chat" so that you have to press enter to chat. So if you can detect that then you can disable WASD. If it's too much work to do, it may not be worth the trouble.