JSFiddle - React, Tailwind, and code Playground

HTML

Get alert with inserting a + sign: <input type="text" class="data" />

JavaScript

$(document).ready(function(){
    $(".data").bind('keydown',function(e){
        
        if(e.which == 107 || e.which == 187){
            alert('Plus sign entered');
        }
    });
});