JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" value=" Delete by hitting the delete key " />

JavaScript

$(document).keyup(function(e) {
    if (e.which == 46) {
        $("input").val("     ");
    }
});