I highlighted two split buttons for Ctrl+ zand Ctrl+ y. I want the Ctrl+ zand Ctrl+ functions to be yexecuted at the click of a button.
To achieve this, I try to call the Ctrl+ zand Ctrl+ ybuttons when the button is pressed, but they do not start.
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;
source
share