DEV: Use `key` over the deprecated `keyCode` (PR #13795)

Makes the code a bit more readable. Inspired by Stop using deprecated `keyCode` on `KeyboardEvent` by chancancode · Pull Request #19185 · emberjs/ember.js · GitHub

GitHub

Do we still need to set the keyCode here?

This more closely imitates the real event, and some of our dependencies still rely on keyCode. So in cases where they may act on those synthetic events we have to provide both properties.