Command Window not registering keyboard input after input command

82 vues (au cours des 30 derniers jours)
Max Allfree
Max Allfree le 9 Avr 2022
Commenté : Hans van Dijk le 20 Déc 2023
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 commentaires
Michael Shagam
Michael Shagam le 20 Déc 2022
Modifié(e) : Michael Shagam le 20 Déc 2022
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
Olaf Constantin Schmidtmann le 20 Déc 2022
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.

Connectez-vous pour commenter.

Réponses (2)

Olaf Constantin Schmidtmann
Olaf Constantin Schmidtmann le 22 Août 2022
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 le 20 Déc 2023
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 commentaires
Olaf Constantin Schmidtmann
Olaf Constantin Schmidtmann le 20 Déc 2023
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.
Hans van Dijk
Hans van Dijk le 20 Déc 2023
thanks, will check out how this may help

Connectez-vous pour commenter.

Catégories

En savoir plus sur Desktop dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by