Keyboard end fix

Refinements to new keyboard home/end logic to improve browser compatibility (namely in IE6, IE9+, FF)