Hitting mouse 4 +5 at the same time deletes all code in live editor

2 次查看(过去 30 天)
I ran into an issue, I believe. I was moving around the live editor and I accidentally hit mouse 4+5 at the same time. This cleared the entire live editor of any code, and in my initial panic I closed the project, losing all of my progress. After rewriting the code, I tried it again (this time with a backup save) and it happened again. I wasn't able to replicate it a third time. Is there a reason for this?
  5 个评论
Ari Dettman
Ari Dettman 2022-2-14
Yes, most likley its something to do with the configuration. Ill look into how they are configured. Thanks!
John D'Errico
John D'Errico 2022-2-14
One possibility is one of the buttons was configured as select all. Then the other is cut. So when you click on them both, it selects everything in the window, and then cuts it to the clipboard, so your window is now empty. So you might try it, then check the clipboard contents. But just look at the configuration. Or at least, be careful where you hold your thumb when using the MATLAB editor. :)

请先登录,再进行评论。

回答(1 个)

Nihal
Nihal 2024-1-2
Hi Ari,
It appears that you've encountered a rather unusual behavior in MATLAB's live editor. The mouse buttons 4 and 5 are typically associated with 'Back' and 'Forward' navigation actions in many applications, but they should not be causing the live editor to clear your code.
This is not standard behavior for MATLAB, and there doesn't seem to be a documented feature or shortcut that would cause the live editor to clear its contents when pressing mouse buttons 4 and 5 simultaneously. There is possiblity of an unintended interaction with another application or utility on your system, or a custom key binding that was somehow set up.
Here are a few ways you could take to troubleshoot this issue:
  • Custom Shortcuts: Check if there are any custom shortcuts set up in MATLAB that might be linked to mouse buttons 4 and 5. You can do this by going to the MATLAB preferences and reviewing the Keyboard Shortcuts settings.
  • External Software: Consider whether you have any mouse or keyboard management software that could be mapping those mouse buttons to a shortcut or macro that affects MATLAB.
Unfortunately, without being able to replicate the issue consistently, it's difficult to pinpoint the exact cause. However, the steps above should help you start investigating the problem. I hope this information helps you.

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by