To trigger the Keypress event from the F11 key, like from a keyboard, we need this.
Call this function whenever you press a button or event that we select.
function mKeyF11(){ var e = new Event('keypress'); e.which = 122; // Character F11 equivalent. e.altKey=false; e.ctrlKey=false; e.shiftKey=false; e.metaKey=false; e.bubbles=true; document.dispatchEvent(e); }
Note: this is a Javascript function and jQuery is not required to support it.
source share