make FrameOnKeydown work better for non-Latin keyboard layouts (might fix issue 2650)