Copy and paste not working after update?

921 views (last 30 days)
Ella Feldmann
Ella Feldmann on 20 Jan 2017
Commented: godfreap on 23 Nov 2022 at 15:22
Hi, I think my matlab updated to the latest version this morning. Now the copy and paste functions wont work from other applications to matlab. Copy and paste still work between scripts in matlab. How can I change the settings back to what they were before?
  8 Comments
Frank
Frank on 23 Oct 2022
Edited: Frank on 23 Oct 2022
@Image Analyst , I hate to complicate the issue, but I have just noticed something I had not seen before, but it seems related. I have been working quite a long time tonight on something and have begun to notice that sometimes (currently about every 15 minutes or so) the editor stops responding to keyboard entries completely. By this I mean if I type any key, the editor does not respond by entering that keystroke into the editor pane. I can move the cursor around and select things but things like backspace and entering text do not work. I have not characterized it very well yet, but it seems similar to this thread
which has been ongoing for some time and some commenters there claim it may have something to do with Java versions. In my case, the "open another editor pane" fix for the copy/paste issue also clears the keyboard lack of response, but I think other methods may also work. I have no idea if the two issues are related but it seems suspciously similar. I will watch it. If it keeps up I may fiddle around a little bit to try to tie the issue down a little more.

Sign in to comment.

Answers (11)

Frank
Frank on 20 Feb 2022
I have been having this same problem with 2021b. It seems not to happen after just opening matlab but starts after a time (not more than 20ish minutes). I can close matlab and restart and that seems to work for a short while also. I checked my keyboard shortcuts preferences settings and Windows is selected not emacs. Plus it is not just the Ctrl+C, Ctrl+V (i.e. the shortcuts) that are not working but the "copy" and "paste" options are not in dark font in the right-click pop up menu, and are not selectable, regardless of whether there is anything in the clip/copy memory. I have found one workaround that seems to be working without fail, but it is still annoying. I found that if I have copied something that I want to paste into a function, I can open up a new script, which allows me to paste into the new script. Then if I copy from the new script I can paste that back into the function where I had wanted to paste it in the first place. Curious. Not monumentally disastrous, but definitely annoying.
  15 Comments
Frank
Frank on 23 Oct 2022
It may be even weirder. David Veit discovered that when the copy/paste fail happens, just open up another script or .m file (without even pasting into it), then go back to the original pane and voila, the problem is gone. That is what I do now. There are so many dangling threads on this conversation I have lost track of where the current status is, but I think the problem is being "worked" somewhere. I have my suspicions where the problem may lie, but all many of us truly care about is getting the quantitative suff we want done and not fooling around with arcane coding issues. I have a follow on it so that if it gets fixed I might find out.

Sign in to comment.


Philippe Lebel
Philippe Lebel on 27 Dec 2018
Edited: Philippe Lebel on 27 Dec 2018
this will maybe seem redundant, but for precision of answer:
the path to change the keyboard setting in order to allow copy-paste as mentionned in Ed's post is:
HOME -- > Preferences --> MATLAB --> Keyboard --> Shortcuts.

Image Analyst
Image Analyst on 9 Mar 2022
I've found that every 3 or 4 days with r2021b, paste won't work in the editor. I can paste to the command window and other places outside MATLAB, but not into the command window. Restarting MATLAB seems to fix it.

Ed Marquez
Ed Marquez on 26 Jan 2017
Hi,
The keyboard short-cuts for Copy (Ctrl+C) and Paste (Ctrl+V) may not work if the "Editor/debugger key bindings" preference is set to "Emacs" instead of "Windows". This may be worth checking for your MATLAB.
In order to check the MATLAB Keyboard preferences File -- > Preferences --> Keyboard --> Shortcuts. If the "Active Settings" option is set to "Emacs", the Copy (Ctrl+C) and Paste (Ctrl+V) features will be disabled. To enable these features, change the "Editor/debugger key bindings" option to "Windows" and click on the "Apply" button in the right bottom corner of the "Preferences" window.
  4 Comments
amin ya
amin ya on 30 Dec 2018
Same here. Restart helps but annoying.

Sign in to comment.


McG
McG on 18 Mar 2022
I have the same problem both with R2021b update 3 and R2022a. Sometimes, but I don't know exactely when and why, paste command doesn't work. After restarting matlab everything starts to works again for undefined time (1 minute, 1 hour, 1 day...).
  3 Comments
ILoveMATLAB
ILoveMATLAB on 10 Sep 2022
McG
I started to have this problem last week in 2022a. Closing and reopening the editor tabs fixes the issue on my machine temporarily.

Sign in to comment.


Mattias Arlbrant
Mattias Arlbrant on 11 Aug 2022
Copy-paste randomly stops working in 2022a. It has been like this for many years now. Please fix this ASAP, it is incredibly annoying.
Btw, "Every large complicated software has bugs" is a horrible excuse for ignoring serious bugs for years. Years!
Mathworks has a very unfortunate tendency to prioritize adding new unstable functionality instead of making the basics work.
  5 Comments
Walter Roberson
Walter Roberson on 7 Oct 2022
I have in the past seen reports of software problems that turned out to depend on the exact processor model together with the order that operating system and DLL updates were installed. Knowing the installed software versions was not enough even if you happened to have the right processor model: you had to have updated in a particular order for the problem to happen.
For example if the first time you installed a particular runtime DLL was after a particular OS update then the problem might occur, but if you had the runtime already installed at the time of the update then even though the update process involved upgrading the DLL, then the problem might not occur. Same installed software, different results (this kind of problem is sometimes a matter of different registry entries, but sometimes different internal versions of the software can get installed...)
Some problems are just really hard to reproduce. They might affect some people a fair bit and yet never occur on the test systems.

Sign in to comment.


David Veit
David Veit on 28 Sep 2022
Same problem here R2022a Update 5. Problem still exists.
It is not a problem with the keyboard shortcuts as also copy/pase using context menu is not working. Works outside MATLAB and Editor restart temporarily "fixes" the problem.

David Veit
David Veit on 4 Oct 2022
Viewing at the suggestions I found out that for me it is enough to switch to another editor tab in the same window and back, without any pasting or typing in the other window. Just switching is enough for me. Note that it has to be in the same Editor Dock Window to work.

Steve Shelby
Steve Shelby on 2 Sep 2022
Edited: Steve Shelby on 26 Oct 2022
Same problem in 2022a. Works again after closing & reopening the file in the MATLAB editor. No restart needed.
  • The Windows keyboard shortcuts are indeed enabled for CTRL+C and CTRL+V. Not the problem.
  • It doesn't work using keyboard shortcuts, nor menu selection. It is beyond the keyboard shortcuts.
  • I can generally paste what I copy to other files in other editors, ... just not to any file in the MATLAB editor.
  • When I close and reopen the file I'm working with then it seems to work fine.
  • Once I close & reopen just one file, ... issue seems to go away for all files.
  3 Comments
Steve Shelby
Steve Shelby on 26 Oct 2022
Using Windows 10 Enterprise. MATLAB 2022a.

Sign in to comment.


Frank
Frank on 4 Oct 2022
Just upgraded to R2022b on Windows 10 and the problem still exists.
My work around still works: when editing functions, scripts, etc and the failure to copy/paste occurs, I just open up a new edit pane and paste into that. After doing that, when I go back to what I was editing, paste works fine. At this stage it is only a minor inconvenience for me.
  1 Comment
godfreap
godfreap on 23 Nov 2022 at 15:22
Wow, I can't believe that works. Thanks man!

Sign in to comment.


Aghamarsh Varanasi
Aghamarsh Varanasi on 4 Oct 2022
Hi everyone,
We are aware of this issue and we are investigating it. We will try to fix this in a future release.
Further, if you are facing this issue, let us know which OS you are facing this, the MATLAB Version, also if you are facing this in regular editor, live editor or App designer. This will help us to narrow down the issue.
  2 Comments
Image Analyst
Image Analyst on 4 Oct 2022
From my "ver" command:
MATLAB Version: 9.13.0.2049777 (R2022b)
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 19044)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Thanks Tom for the workaround. That might be faster than restarting MATLAB.

Sign in to comment.

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!