JSFiddle - React, Tailwind, and code Playground

by umer qureshi

HTML

<p>First Click here then press enter to detect</p>

JavaScript

$(document).keypress(function (e) {
    if (e.which == 13) {
        alert('enter key is pressed');
        console.log('enter key is pressed');
    }
});