JSFiddle - React, Tailwind, and code Playground

HTML

<textarea class="input_capital"></textarea>

JavaScript

$(".input_capital").on('keydown', function(evt) {
  $(this).val(function (_, val) {
    return val + String.fromCharCode(evt.which).toUpperCase();
  });
  
  return false;
});