Using event.key instead of deprecated event.keyCode