Command Window not registering keyboard input after input command

85 次查看(过去 30 天)
When I run an input command, the cursor shifts to the command window waiting for an input, but when I start typing nothing happens. If I then click on the command window and begin typing, it works as normal.
Also when the command window is undocked, it works fine. It is only when I dock the command window that it is not registering text.
For example if I run:
clear; clc;
commandwindow
number = input('Enter a Number: ');
Then the focus shifts to the command window and it prints "Enter a Number: " but I cannot type anything until I click on the command window.
Never had this problem on the old versions of MATLAB, I am running 2022a.
Cheers
  9 个评论
Michael Shagam
Michael Shagam 2022-12-20
编辑:Michael Shagam 2022-12-20
I am having similar issues In Matlab R2022b running on MacOS Monteray V12.6.1. I notice the behavior changed when upgraded to R2022b from R2020a previously (I think).
If I simply switch from the editor to the command window with shortcut key "ctrl" + "tab" the cursor keys work in the command window, but no other keys will work. I find myself now having to use excessive mouse clicks to engage the command window to start registering text from the keyboard. Supper annoying and destructive to my workflow, and I think this is seriously going to give me carpal tunnel from all the extra clicks needed.
Olaf Constantin Schmidtmann
Hi Michael,
yes, this is really a show stopper. I had the same issue, when switching to the cmd window using cmd+0.
On my Mac (now Big Sur 11.7.1), the keyboard input worked as expected, when I undocked the comand window. Even with the cmd window on a second screen, this is just a temporary solution, though, but may prevent carpal tunnel…
Best of luck!
On a similar note for OS X users: I also switched the JRE version to OpenJDK (Adoptium / Temurin v8) and created a launcher, which opens MATLAB via bash. At least for, this combination prevented a lot of crashes ('disk of death') when working with figures or switching windows and screens. Overall, it seems that MATLAB does not play nice with OS X window system.

请先登录,再进行评论。

回答(2 个)

Olaf Constantin Schmidtmann
Same issue on macOS Big Sur 11.6.8 running R2022a Update 4: the command window seems to get the focus (visually in the GUI + the arrow keys stay responsive), but it does not react to character inputs or the enter key. Very annoying. Please fix this.
A workaround for me is to undock the command window.

Hans van Dijk
Hans van Dijk 2023-12-20
I have the same issue, updated now to 2023b on my MacBook Pro running now on macOS Sonoma 14.2 but the same issue still exists unfortunately. Lots of extra mouse clicks need. Also switching between matlab windows using command+~ does not work all the time properly.
  2 个评论
Olaf Constantin Schmidtmann
Still on macOS Ventura, using the 2023b and I also (still) have the issue as described above.
However, I switch windows using the keys macOS (re-)defined keys, which works fine. Also, it helped a lot to use the OpenJDK Java 11 which is finally supported – before we could only use version 8. Some UI setting have to tweaked, but a lot of issues (e.g., crashes) disappeared.
The procedure is described here (MATLAB Central). You may want to give it a try.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Desktop 的更多信息

产品


版本

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by