DRY out key event handlers by combining them, and switch to .on().

Since `.on()` is used in several places already this code is jQuery 1.7+ so it might as well use `.on()` consistently.