You're right -- this is not really related to the bug you're fixing. We'll fix it in the other branch.

FYI, I used keyCode because charCode is 0 for Tab and Enter.