In an input box or contenteditable=true div, how can I modify a keypress for the letter \"a\" to return a keybress for the letter \"b\"? I.e., every time you type the letter
I'm not sure if this is "easily" do-able, with something like this:
$(window).keypress(function(e) {
//Captures 'a' or 'A'
if(e.which == 97 || e.which == 65)
{
//Simulate a keypress in a specific field
}
});
I do know that jQuery has a simulate plug-in to simulate keypress events etc, jQuery Simulate. It might be worth looking into - also possibly some type of jQuery Trigger() event.