I have provided two separates button for Ctrl+z and Ctrl+y. I want the Ctrl+z and Ctrl+y functionality to be performed on the click of a button.
To achieve this, I am trying to trigger Ctrl+z and Ctrl+y on button click but they are not getting triggered.
The code I have written so far:
case "undo":
var press = jQuery.Event("onkeydown");
press.ctrlKey = true;
press.keyCode = 90;
jQuery(".excellentableEditSpread").trigger(press);
break;
case "redo":
var press = jQuery.Event("onkeydown");
press.ctrlKey = true;
press.keyCode = 89;
jQuery(".excellentableEditSpread").trigger(press);
break;
on
from Event type text, usage should be likejQuery.Event("keydown")
– Alrzc