Be smarter about keyCode vs. charCode in the stubs.