Cannot type symbols on dead keys (e.g., to write ', ", or ^)

Using MATLAB R2022b Update 5 on Fedora Linux 37, but also confirmed not working on Ubuntu 22.04. I cannot write symbols that are on "dead keys", such as ', ", or ^. Normally, I would press the key and then space and the character appears, but now, only a space is inserted. It does work when switching to a keyboard layout that does not contain such dead keys (e.g., US International). Is this a bug or a problem on my side? I could not find anything about this issue.

7 comentarios

Antonio Sala
Antonio Sala el 26 de Mzo. de 2023
Editada: Antonio Sala el 26 de Mzo. de 2023
Well, with 2023a it seems to be a bug, it happened to me in three machines, both in Ubuntu 22.04 and 22.10.
I asked a question to support and they told me it was upstreamed to developer team. However, they could not ensure which priority this was going to have...
I don't have that buggy behaviour in 2022b update 3.
Andreas
Andreas el 26 de Mzo. de 2023
Yep, the problem came into existence with update 5 I think.
Antonio Sala
Antonio Sala el 25 de Sept. de 2023
Still present in 2023b in Ubuntu 22.04.
Same issue in R2023B running at AlmaLinux 9. But, it's not a "linux" issue, It's obvious that it's a Matlab issue.
I am still having this problem with Ubuntu 24.04 and MATLAB R2024b update 5.
A fix that used to work no longer works (defining XLOCALEDIR).
Luis Henríquez
Luis Henríquez el 15 de Jun. de 2025
Editada: Luis Henríquez el 15 de Jun. de 2025
Similar problem in MATLAB 2025a (OpenSUSE 15.6, Spanish keyboard) when dark theme desktop is used, the caret symbol can not be typed.
No idea what to do.
same issue, latin america layout and I can't type any symbols no mather the theme. I'm using linux mint

Iniciar sesión para comentar.

Respuestas (5)

Tommi Heikkilä
Tommi Heikkilä el 26 de Abr. de 2023

5 votos

I had the same issue with MATLAB R2023a, Finnish keyboard and Ubuntu 22.04. The workaround for the issue was the same as here: https://ubuntuforums.org/showthread.php?t=1911860
In Ubuntu settings I set the keyboard to 'Finnish (classic, no dead keys)' instead of 'Finnish' and now the keys work fine in Matlab.
Of course the behaviour is also slightly different: the symbols '¨ ^ ~' are typed straight away instead of being able to write accented characters but to me it's no big deal.

2 comentarios

Andreas
Andreas el 26 de Abr. de 2023
That's also the solution I used (select a keyboard layout without dead keys). Still, it'd be nice if this were fixed.
Yes, there is definitely something wrong with how Matlab or Ubuntu currently treats the dead keys because they used to work just fine. I just wanted to offer a workaround / bandaid solution because it is a super annoying problem.

Iniciar sesión para comentar.

Cris LaPierre
Cris LaPierre el 26 de Mzo. de 2023
If those keys are only not working in MATLAB, please report this as a bug to customer support: https://www.mathworks.com/support/contact_us.html

7 comentarios

Here is one workaround.
Either write in a terminal 'setxkbmap -variant nodeadkeys' before running matlab
or put in our startup.m system('setxkbmap -variant nodeadkeys');
both seems to work on manjaro 23.0.0
Simon Beyer
Simon Beyer el 19 de Jul. de 2023
still not working for me
Antonio Sala
Antonio Sala el 25 de Sept. de 2023
I spoke to customer support when that happened to me at 2023a launch... They replied they moved the issue "upstream"... but, well, the bug is still there in 2023b, I just installed it but, sadly, cannot type accents in my MLX files for my students, nor 2^2...
I don't know if 2023b would have any workaround, but I didn't find any for 2023a. "No dead keys" keyboard setup means "useless in a language where 30% of words have accents".
Andreas
Andreas el 25 de Sept. de 2023
@Antonio Sala Thanks for your reply, shame to hear the issue hasn't been resolved yet on R2023b. Perhaps as a temporary workaround, you could use a different editor to write the text and copy-paste that into the mlx file.
Edilberto
Edilberto el 23 de Nov. de 2023
I have the same problem with Ubuntu 22.04 and Matlab 2022b, 2023a, 2023b.
This bug seems to have been resolved in 24a prerelease... Well it's still unreleased/beta so who knows if fixing something else will break that again but, for the moment being, there is hope in the horizon.
Ramz
Ramz el 29 de Mayo de 2024
Editada: Ramz el 29 de Mayo de 2024
I tried the MATLAB 24a pre release and the 24a official release but the problem was still there for me on Ubuntu 22.04. With a normal (German) keyboard, either "normal" keyboard settings and also "no dead key" settings all result in some weird state change that after a bracket { or [ i can not continue typing unless i press escape or click on the cursor. It is really annoying, disturbing the workflow. Also If by accident the esc key is pressed twice or to long, all previously typed text on the commandline dissapears. Later i found that this could be solved for me by using: com.mathworks.desktop.mnemonics.MnemonicsManagers.get.disable
The problem was that to write brackets and other characters the Alt Gr key was necessary, but this was some how assigned to other short cuts, not visible in the short cut menu.

Iniciar sesión para comentar.

Daniel
Daniel el 16 de Jun. de 2024

0 votos

I had the same problem with Ubuntu 24.04 and MATLAB R2024a.
To solve it, I just start matlab as super user with the command "sudo ./matlab" from the folder ......../MATLAB/R2024a/bin
Franklin Ronald
Franklin Ronald el 28 de Jul. de 2025

0 votos

Same issue with Fedora 42 and MATLAB R2025a.
The Classic UI (written in Java) did not have this problem, while the new desktop (HTML+JS) has always exhibited this problem since the beta.
It is clear that the issue lies in the Qt layer that hosts MATLAB’s webview, because when using it via the browser (https://matlab.mathworks.com), the problem does not occur.
Sergio
Sergio el 9 de Mzo. de 2026
Editada: Sergio el 17 de Mzo. de 2026

0 votos

Still unfixed. With Kubuntu 24.01 and MATLAB 2025b don't work deadkeys.
I have US keyboard and trying write Spanish it's a madness. Of course, to code it's not a big deal, but for live scripts it's simply impossible. Anytime that you want to write some accented word you have to copy that word form another program and paste it in MATLAB.
And keyboard layout isn't a option, since the US layout and Spanish layout are quiet different.

Categorías

Más información sobre Scripts en Centro de ayuda y File Exchange.

Productos

Versión

R2022b

Etiquetas

Preguntada:

el 23 de Mzo. de 2023

Editada:

el 17 de Mzo. de 2026

Community Treasure Hunt

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

Start Hunting!

Translated by