JSFiddle - React, Tailwind, and code Playground

HTML

<head runat="server">
<title></title>

</head>

<body>
<form id="form1" runat="server">
<div>        
    <img id="img1" alt ="" width="950" height="950" />        
    <input onkeypress="EnterToTab();" />        
    <input onkeypress="EnterToTab();" /> 
</div>    
</form>
</body>

JavaScript

var img = document.getElementById("img1");

img.onkeypress = function(){
    alert("test");
};

document.onkeypress = function(){
    alert(document.activeElement);
};
  function EnterToTab() {
      if (event.keyCode == 13) {
          event.keyCode = 9;
      }
  }