From the manual:
f any events exist for 'On key pressed' with a given key, Construct 2 blocks the browser from performing its normal action. For example, if you wish to prevent space bar scrolling down the page, add an empty 'On Space pressed' event, if you don't have one already.
So if you add an empty 'On W pressed' event it should block it, but that particular combination may not be blockable for security reasons (so web pages cannot make it difficult to leave the page). You might need to adjust the controls...
Behaviors using default controls block their keypresses as well, but not custom control behaviors without 'On key pressed'. Also the 'Is key down' does not block the key, only 'On key pressed', since it's too late for Construct 2 to block the key in 'Is key down'.