Skip to content

Instantly share code, notes, and snippets.

@supernullset
Created April 25, 2015 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supernullset/7de2bb21543a7dfe2114 to your computer and use it in GitHub Desktop.
Save supernullset/7de2bb21543a7dfe2114 to your computer and use it in GitHub Desktop.
sendKeyPress: function() {
console.log('sendKeyPress');
var $editor = $(this.get('editor').getDocument()).find('body');
var keyEvent = $.Event( "keypress", { keyCode: 69, which: 69, charCode: 69 });
$editor.focus();
$editor.trigger(keyEvent);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment