I failed to make my system, R2016a on Win7, behave as you describe. On the contrary it behaves exactly as you want it to do.
The command, keyboard, makes Matlab switch to debug-mode and if I start typing text it appears in the command window after the prompt, K>>. When I move the cursor over the editor window it switches to the spinning wheel. Clicking in the editor allows me to type code.  
2 Comments
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/280062-how-can-i-pass-control-back-to-the-matlab-command-prompt-after-keyboard-command#comment_514571
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/280062-how-can-i-pass-control-back-to-the-matlab-command-prompt-after-keyboard-command#comment_514571
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/280062-how-can-i-pass-control-back-to-the-matlab-command-prompt-after-keyboard-command#comment_531378
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/280062-how-can-i-pass-control-back-to-the-matlab-command-prompt-after-keyboard-command#comment_531378
Sign in to comment.