Skip to content Skip to sidebar Skip to footer

Trigger Ctrl+a Event

I have a SAPUI5 SelectDialog control, which contains StandardListItem control inside it to display a list of data, something like this: I can select each entry one by one. What I

Solution 1:

I think your solution can be found here: Firing a Keyboard Event in JavaScript

you basically need to trigger two key-events. At first for the ctrl and followed up the 'a'.

var ctrlEvent = newKeyboardEvent("keydown", {bubbles : true, cancelable : true, keyCode : 17, char : 17, shiftKey : true});
var aEvent = newKeyboardEvent("keydown", {bubbles : true, cancelable : true, keyCode : 65, char : 65, shiftKey : true});

document.dispatchEvent(ctrlEvent);
document.dispatchEvent(aEvent);

Post a Comment for "Trigger Ctrl+a Event"