Fix compatibility handling of native keycodes