Cannot type symbols on dead keys (e.g., to write ', ", or ^)
Show older comments
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 Comments
Antonio Sala
on 26 Mar 2023
Edited: Antonio Sala
on 26 Mar 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
on 26 Mar 2023
Antonio Sala
on 25 Sep 2023
Still present in 2023b in Ubuntu 22.04.
Franklin Ronald
on 27 Feb 2024
Same issue in R2023B running at AlmaLinux 9. But, it's not a "linux" issue, It's obvious that it's a Matlab issue.
Bernt Nilsson
on 28 Feb 2025
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
on 15 Jun 2025
Edited: Luis Henríquez
on 15 Jun 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.
Sebastián Gómez Jorge
on 24 Jun 2025
same issue, latin america layout and I can't type any symbols no mather the theme. I'm using linux mint
Answers (5)
Tommi Heikkilä
on 26 Apr 2023
5 votes
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 Comments
Andreas
on 26 Apr 2023
Tommi Heikkilä
on 26 Apr 2023
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.
Cris LaPierre
on 26 Mar 2023
1 vote
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 Comments
julien javaloyes
on 18 Jul 2023
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
on 19 Jul 2023
still not working for me
Antonio Sala
on 25 Sep 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
on 25 Sep 2023
Edilberto
on 23 Nov 2023
I have the same problem with Ubuntu 22.04 and Matlab 2022b, 2023a, 2023b.
Antonio Sala
on 14 Jan 2024
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.
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.
Daniel
on 16 Jun 2024
0 votes
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
on 28 Jul 2025
0 votes
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
22 minutes ago
0 votes
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 no, change to a keyboard layout isn't a option, since the US layout and Spanish layout are quiet different.
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!