Keyboard refactor: call preventDefault last to avoid IE<9 complication

In IE<9, Dojo sets keyCode to 0 if ctrlKey is true during preventDefault.
Therefore, we want other event processing to occur before doing this.