Change getting the keycode to a more 1.6.4 friendly way