Absent Member.
Absent Member.

Performance Center - Support Tip : How to emulate a Ctrl + (keystroke) in AJACX TruClient

This is for AJAX TruClient when trying to emulate a Ctrl + (keystroke) on an application. As the recorded event may not perform the required action.


Link in knowledgebase: http://support.openview.hp.com/selfsolve/document/KM00470352


How to emulate a Ctrl + (keystroke) in AJACX TruClient


You can replace the keypress step with a generic object action, change the step action to evaluate javascript and paste the code below in the step arguments. In this case we are using G as key stroke as shown charCode, replace this with the needed keystroke.

var Ci = Components.interfaces;
var keyCode = 0, charCode = 0, modifiers = 0;
charCode = 'g'.charCodeAt(0);
var utils = this.object.ownerDocument.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
utils.sendKeyEvent("keypress", 71, charCode, modifiers, true);




Mario M.

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.


Performance Center:

How to:

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Labels (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.