Suppose I press the Tab key, I would want that it performs another action besides the default event. I've selected a text box and I want it to add some spaces (Just wanting a textarea to act like a text editor). How to trigger this type of event?
So far, I only know how to prevent the default action:
$('#content').on('keydown', function(e) { if(e.which == 9) { e.preventDefault(); }}); But how do you fire another keyboard event?