I'm running on CyanogenMod and in the middle of typing, the keyboard would freeze heavily and crash/minimize and I can't get it back up. This lasts for about a minute.
If your screen blinks and/or keyboard freezes, go into
Settings --- > Developer options and make sure the following are checked. Disable HW Overlays and Force GPU Rendering
Now it should be blink/flash-freeze-free