Input text field with onKeyDown not firing onKeyDown event


So I’m using a custom class that is an expanding input text field, and while before I was having an issue of it not allowing backspace, left, or right, following the advice of this post:

I found that it did fix that behavior at least, but their suggested “onKeyDown” event is not firing. I am using typescript to program, so it may look a little different to javascript. I’ve modified the code to exclude the expanding functions and other things, but it still doesn’t fire the onKeyDown event.

    width: "100px"
    outline: "none",
    padding: 0
  onKeyDown={e => {
    if (e.key === "Tab") {
      if (e.shiftKey) {
      } else {
    } else if (e.key === "Enter") {
      console.log("pressed enter")
  onChange={e => {if (onChange !== undefined) onChange()}}
  onClick={e => e.stopPropagation()}

Even when typing normal letters, keyDown does not activate. Any tips or pointing out what I’m missing?