This issue can be caused by the incompatibility of Magnet App, BetterTouchTool, or similar window-snapping apps with MATLAB R2019a prerelease or MATLAB R2018b on macOS.
This can also be due to applications like Text Expander and Phase Express.
To work around the issue, please try one of the following solutions to see if it resolves the issue:
1) Switch MATLAB to use the JetBrains version of JRE that can be downloaded from the following link:
Installing the version of JRE linked above may cause JAVA errors in MATLAB. However, these errors should not have any side effects.
2) If you are using a multi-monitor setup, moving MATLAB to a secondary monitor may prevent the issue. However, moving MATLAB back to the primary monitor may cause the issue to recur.
3) Consider switching to Spectacle. Performance regressions have not been reported on this App thus far. Find more information on the Spectacle App in the link below:
4) You should be able to use keyboard shortcuts with no delays.
5) Closing the window-snapping app and restarting MATLAB may solve this issue. This has been seen to be effective for many past instances of similar behavior.
Alternately, you might also be able to work around this incompatibility by disabling some functionality in the window-snapping app you are using or changing its settings to ignore MATLAB.
For instance, we have seen that BetterTouchTool can be left running, but the "Window Snapping" feature must be disabled for MATLAB to function properly. If quitting the app resolved the issue, you may want to try to disable the "Window Snapping" feature and restart MATLAB, if it is more convenient for your workflow.