Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    how to generate "tab" key followed by "Escape" key when user press alt + c

    I have tried to call a javascript function with isc.Page.registerKey.
    function genTabKey(){
    var evt = document.createEvent("KeyboardEvent");
    (evt.initKeyEvent || evt.initKeyboardEvent)("keypress", true, true, window,
    0, 0, 0, 0,
    0, 9);
    var canceled = document.dispatchEvent(evt);
    (evt.initKeyEvent || evt.initKeyboardEvent)("keypress", true, true, window,
    0, 0, 0, 0,
    0, 27);
    canceled = document.dispatchEvent(evt);
    }
    I got this error "Uncaught TypeError: Illegal invocation"
Working...
X