Use event.key instead of event.code
event.code
was not always present in my testing; not entirely sure why as MDN suggests using such over event.keyCode
(deprecated).
While event.code
would be ideal, using event.key
will suffice for now until further digging can occur.