JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<body>
<h1>Pres Ctrl + z and Ctrl + y</h1>
<form action="#">
<label>TextBox : </label>
<input id="textA" type="text" size="50"
value="Copy, paste or cut message here" />
</form>
<span></span>
</body>
CSS
span{
color:blue;
}
JavaScript
$(document).keydown(function(e){
if( e.which === 89 && e.ctrlKey ){
alert('control + y');
}
else if( e.which === 90 && e.ctrlKey ){
alert('control + z');
}
});