JSFiddle - React, Tailwind, and code Playground

HTML

<form id="no_keyboard">
   <input type="text" name="teste1">
   <input type="text" name="teste2">
   <input type="text" name="teste3">
   <input type="submit">
</form>

CSS

.focused{
  border:1px solid purple;
}

JavaScript

$('#no_keyboard input').focus(function(){
    $('.focused').removeClass("focused");
    $(this).blur().addClass('focused');
    text = $('.focused').val();
});

$(window).keypress(function(e){
       if (e.which != 8){
         	text = text+String.fromCharCode(e.which);
       }
       else{
          e.preventDefault();
          text = text.substring(0,text.length-1);
       }
       $('.focused').val(text);
});