JSFiddle - React, Tailwind, and code Playground

HTML

<h1>Converti le point en virgule</h1>
<p>en AZERTY comme en QWERTY</p>
<p><input id="input" type="text" value="12345"></p>

CSS

strong {
    color:#ff00aa;
}
#input {
    font-size:2em;
    font-family: serif;
}

JavaScript

$('#input').keypress(function(e){
    if ( e.charCode == 46 ) {
         $(this).val($(this).val()+',');
         e.preventDefault();
    }
});