As of at least Phaser v3.86.0 it is now like this (using a dash instead of an underscore):
create() { // ... this.input.keyboard.on('keydown-W', this.yourFunction, this); // ... }